Linux/linux 121d57anet/ipv4 esp4_offload.c tcp_offload.c, net/ipv6 esp6_offload.c tcpv6_offload.c

gso: validate gso_type in GSO handlers

Validate gso_type during segmentation as SKB_GSO_DODGY sources
may pass packets where the gso_type does not match the contents.

Syzkaller was able to enter the SCTP gso handler with a packet of
gso_type SKB_GSO_TCPV4.

On entry of transport layer gso handlers, verify that the gso_type
matches the transport protocol.

Fixes: 90017accff61 ("sctp: Add GSO support")
Link: http://lkml.kernel.org/r/<001a1137452496ffc305617e5fe0@google.com>
Reported-by: syzbot+fee64147a25aecd48055 at syzkaller.appspotmail.com
Signed-off-by: Willem de Bruijn <willemb at google.com>
Acked-by: Jason Wang <jasowang at redhat.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
DeltaFile
+3-0net/ipv4/esp4_offload.c
+3-0net/ipv4/tcp_offload.c
+3-0net/ipv4/udp_offload.c
+3-0net/ipv6/esp6_offload.c
+3-0net/ipv6/tcpv6_offload.c
+3-0net/ipv6/udp_offload.c
+3-0net/sctp/offload.c
+21-07 files

UnifiedSplitRaw