Files
linux/net/ipv4
Willem de Bruijn a8c744a8b4 udp: disable gso with no_check_tx
Syzbot managed to send a udp gso packet without checksum offload into
the gso stack by disabling tx checksum (UDP_NO_CHECK6_TX). This
triggered the skb_warn_bad_offload.

  RIP: 0010:skb_warn_bad_offload+0x2bc/0x600 net/core/dev.c:2658
   skb_gso_segment include/linux/netdevice.h:4038 [inline]
   validate_xmit_skb+0x54d/0xd90 net/core/dev.c:3120
   __dev_queue_xmit+0xbf8/0x34c0 net/core/dev.c:3577
   dev_queue_xmit+0x17/0x20 net/core/dev.c:3618

UDP_NO_CHECK6_TX sets skb->ip_summed to CHECKSUM_NONE just after the
udp gso integrity checks in udp_(v6_)send_skb. Extend those checks to
catch and fail in this case.

After the integrity checks jump directly to the CHECKSUM_PARTIAL case
to avoid reading the no_check_tx flags again (a TOCTTOU race).

Fixes: bec1f6f697 ("udp: generate gso with UDP_SEGMENT")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-01 14:20:14 -04:00
..
2018-04-05 22:05:03 -04:00
2017-10-21 01:33:19 +01:00
2018-03-27 13:18:09 -04:00
2018-04-23 10:21:24 -04:00
2018-03-27 13:18:09 -04:00
2018-03-27 13:18:09 -04:00
2018-03-27 13:18:09 -04:00
2018-04-26 15:08:15 -04:00
2018-03-27 13:18:09 -04:00
2018-03-27 13:18:09 -04:00
2018-03-26 13:14:43 -04:00
2018-04-23 10:21:24 -04:00
2018-03-27 13:18:09 -04:00
2018-04-19 13:05:16 -04:00
2018-03-27 13:18:09 -04:00
2017-10-16 21:24:25 +01:00
2018-05-01 09:42:46 -04:00
2018-02-28 11:43:28 -05:00
2018-04-27 20:32:39 -04:00
2018-05-01 14:20:14 -04:00
2018-03-27 13:18:09 -04:00