diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2014-06-25 09:37:21 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-06-26 10:48:22 +0100 |
commit | 95782bf434437b3292f5cb9ce21b53bdbc1beda1 (patch) | |
tree | df217b9e4d2a4ec7ded37d7d3aea6c34d547e8e9 /arch/mips/Kbuild | |
parent | e5bb48b0553d75918094c5a6f7b60a4359887218 (diff) | |
download | op-kernel-dev-95782bf434437b3292f5cb9ce21b53bdbc1beda1.zip op-kernel-dev-95782bf434437b3292f5cb9ce21b53bdbc1beda1.tar.gz |
MIPS: BPF: Prevent kernel fall over for >=32bit shifts
Remove BUG_ON() if the shift immediate is >=32 to avoid kernel crashes
due to malicious user input. If the shift immediate is >= 32,
we simply load the destination register with 0 since only
32-bit instructions are used by JIT so this will do the
correct thing even on MIPS64.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7179/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Kbuild')
0 files changed, 0 insertions, 0 deletions