Thread (24 messages) flat view 24 messages, 6 authors, 2016-01-13

[PATCHv2] net: bpf: reject invalid shifts

From: Alexei Starovoitov <hidden>
Date: 2016-01-12 19:26:21
Also in: netdev

On Tue, Jan 12, 2016 at 08:17:08PM +0100, Rabin Vincent wrote:
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 <redacted>
---
v2: handle BPF_ARSH too
Thanks.
Acked-by: Alexei Starovoitov <ast@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help