UPSTREAM: net/flow_dissector: correctly cap nhoff and thoff in case of BPF
We want to make sure that the following condition holds:
0 <= nhoff <= thoff <= skb->len
BPF program can set out-of-bounds nhoff and thoff, which is dangerous, see
recent commit d0c081b49137 ("flow_dissector: properly cap thoff field")'.
Change-Id: Ib698bb051c4043ebb841283f23f6a4e4c787613b
Signed-off-by:
Stanislav Fomichev <sdf@google.com>
Acked-by:
Song Liu <songliubraving@fb.com>
Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Loading
Please register or sign in to comment