https://github.com/torvalds/linux
Revision 9274124f023b5c56dc4326637d4f787968b03607 authored by Willem de Bruijn on 04 May 2020, 16:48:54 UTC, committed by David S. Miller on 07 May 2020, 00:23:06 UTC
Syzkaller again found a path to a kernel crash through bad gso input:
a packet with transport header extending beyond skb_headlen(skb).

Tighten validation at kernel entry:

- Verify that the transport header lies within the linear section.

    To avoid pulling linux/tcp.h, verify just sizeof tcphdr.
    tcp_gso_segment will call pskb_may_pull (th->doff * 4) before use.

- Match the gso_type against the ip_proto found by the flow dissector.

Fixes: bfd5f4a3d605 ("packet: Add GSO/csum offload support.")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0cb7498
History
Tip revision: 9274124f023b5c56dc4326637d4f787968b03607 authored by Willem de Bruijn on 04 May 2020, 16:48:54 UTC
net: stricter validation of untrusted gso packets
Tip revision: 9274124

back to top