virtio-net: Ensure that TCP packets don't overflow gso_segs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7c6d2ecbda83150b2036a2b36b21381ad4667762 · < 75c271c48f483af678e514734e10b2452410e08c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
virtio-net: Ensure that TCP packets don't overflow gso_segs
The user can specify any gso_size in a packet crafted with an AF_PACKET PACKET_VNET_HDR socket, even smaller than TCP_MIN_GSO_SIZE = 8. At the same time, GSO_MAX_SIZE = 8 * GSO_MAX_SEGS = 8 * 65535. When the user crafts a packet with gso_size < 8, there is a risk for partial GSO to overflow the 16-bit gso_segs field when dividing the SKB length by gso_size.
Adjust gso_size of TCP packets to be at least TCP_MIN_GSO_SIZE = 8. Keep gso_size of UDP GSO packets, as gso_size=1 is valid and explicitly tested at tools/testing/selftests/net/tun.c:649.
From the CVE record · Linux
The Linux kernel's virtio-net handling of TCP packets can overflow the 16-bit gso_segs field during partial GSO. A local user can trigger the risk by crafting a packet with a gso_size smaller than 8 through an AF_PACKET PACKET_VNET_HDR socket.
Engineers running Linux kernels with the affected virtio-net code should check their installations; affected versions were not provided.