]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
udp: never accept GSO_FRAGLIST packets
authorPaolo Abeni <pabeni@redhat.com>
Tue, 30 Mar 2021 10:28:52 +0000 (12:28 +0200)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:34 +0000 (17:46 -0600)
commitbfd9d52817b1ce3570bff4cdeb47890ae9d085f5
treee23f4c55a10606f49c159a2dd6e5309c585810b1
parent3035f57a583a19cf2b67a63a6a5fc34c8919d9ac
udp: never accept GSO_FRAGLIST packets

BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit 78352f73dc5047f3f744764cc45912498c52f3c9 ]

Currently the UDP protocol delivers GSO_FRAGLIST packets to
the sockets without the expected segmentation.

This change addresses the issue introducing and maintaining
a couple of new fields to explicitly accept SKB_GSO_UDP_L4
or GSO_FRAGLIST packets. Additionally updates  udp_unexpected_gso()
accordingly.

UDP sockets enabling UDP_GRO stil keep accept_udp_fraglist
zeroed.

v1 -> v2:
 - use 2 bits instead of a whole GSO bitmask (Willem)

Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
include/linux/udp.h
net/ipv4/udp.c