Re: [PATCH bpf] bpf: fix bpf_skb_load_bytes_relative pkt length check

From: Alexei Starovoitov <hidden>
Date: 2018-07-29 17:12:20

On Sat, Jul 28, 2018 at 10:04 PM, Daniel Borkmann [off-list ref] wrote:
The len > skb_headlen(skb) cannot be used as a maximum upper bound
for the packet length since it does not have any relation to the full
linear packet length when filtering is used from upper layers (e.g.
in case of reuseport BPF programs) as by then skb->data, skb->len
already got mangled through __skb_pull() and others.

Fixes: 4e1ec56cdc59 ("bpf: add skb_load_bytes_relative helper")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <redacted>
Great catch.
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