Linux/linux 7c68d1anet/core dev.c

net: qdisc_pkt_len_init() should be more robust

Without proper validation of DODGY packets, we might very well
feed qdisc_pkt_len_init() with invalid GSO packets.

tcp_hdrlen() might access out-of-bound data, so let's use
skb_header_pointer() and proper checks.

Whole story is described in commit d0c081b49137 ("flow_dissector:
properly cap thoff field")

We have the goal of validating DODGY packets earlier in the stack,
so we might very well revert this fix in the future.

Signed-off-by: Eric Dumazet <edumazet at google.com>
Cc: Willem de Bruijn <willemb at google.com>
Cc: Jason Wang <jasowang at redhat.com>
Reported-by: syzbot+9da69ebac7dddd804552 at syzkaller.appspotmail.com
Acked-by: Jason Wang <jasowang at redhat.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
DeltaFile
+15-4net/core/dev.c
+15-41 files

UnifiedSplitRaw