]> git.baikalelectronics.ru Git - kernel.git/commit
net: check untrusted gso_size at kernel entry
authorWillem de Bruijn <willemb@google.com>
Mon, 25 May 2020 19:07:40 +0000 (15:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 03:23:46 +0000 (20:23 -0700)
commitc6b161d9baf70b3544c495bfbf353cba792a62d5
treed512c61bcf35dfa3057289a23977bacc7e35fd9f
parent7e268a38e9715f69a7374d0955aa2b4b0ffff0e3
net: check untrusted gso_size at kernel entry

Syzkaller again found a path to a kernel crash through bad gso input:
a packet with gso size exceeding len.

These packets are dropped in tcp_gso_segment and udp[46]_ufo_fragment.
But they may affect gso size calculations earlier in the path.

Now that we have thlen as of commit 5297fdf10719 ("net: stricter
validation of untrusted gso packets"), check gso_size at entry too.

Fixes: 09a22ba4d6d4 ("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>
include/linux/virtio_net.h