summaryrefslogtreecommitdiff
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2016-01-12 20:17:08 +0100
committerMichael Bestas <mkbestas@lineageos.org>2022-04-19 00:49:54 +0300
commite340286c920fad5301253d16fe7786f94aab4ebb (patch)
treeaa243f8f96f4e207cfcfd75d587d9699723978ba /kernel/bpf/arraymap.c
parent99ca4c863fad2090138699d69cb9a54f18cdd962 (diff)
net: bpf: reject invalid shifts
On ARM64, a BUG() is triggered in the eBPF JIT if a filter with a constant shift that can't be encoded in the immediate field of the UBFM/SBFM instructions is passed to the JIT. Since these shifts amounts, which are negative or >= regsize, are invalid, reject them in the eBPF verifier and the classic BPF filter checker, for all architectures. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions