From: Markos Chandras Date: Wed, 25 Jun 2014 08:37:21 +0000 (+0100) Subject: MIPS: BPF: Prevent kernel fall over for >=32bit shifts X-Git-Tag: omap-for-v3.16/fixes-rc4~42^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95782bf434437b3292f5cb9ce21b53bdbc1beda1;p=pandora-kernel.git 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 Cc: David S. Miller Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: netdev@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7179/ Signed-off-by: Ralf Baechle --- Reading git-diff-tree failed