CVE-2026-139319: bpf: Don't let bpf_skb_adjust_room() use up the MSS

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf: Don't let bpfskbadjustroom() use up the MSS

When bpfskbadjustroom() grows a TCP GSO packet without BPFFADJROOMFIXEDGSO, gsosize is lowered by the number of bytes added. Nothing looks at how large it is.

gsosize is the size of the segments the peer has sent if the packet comes out of GRO, and what the sender has written into the virtio header if it comes from a tun device or a packet socket. If it equals lendiff the result is 0, and a packet of up to 64 KB is no GSO packet any more. If it is smaller, the 16 bit value wraps around.

One less than lendiff gives GSOBYFRAGS. skbsegment() then takes the length of each segment from the fraglist. A packet with more than 64 KB of payload gets that far, and one from a tun device has no fraglist:

BUG: KASAN: null-ptr-deref in skbsegment+0xcf1/0x1a90 BUG: kernel NULL pointer dereference, address: 0000000000000070 tcpgsosegment+0x1be/0x9f0 inetgsosegment+0x288/0x740 inetgsosegment+0x288/0x740 skbmacgsosegment+0x179/0x2e0

What is left must not be less than TCPMINGSOSIZE either. The stack relies on that for the number of segments to fit into gsosegs, see commit c27c449d455a ("virtio-net: Ensure that TCP packets don't overflow gsosegs").

Refuse to grow a packet that would end up with less, with the error that other packets which cannot be adjusted get.

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
Description

Frequently Asked Questions

1

What traffic and BPF behavior are needed to trigger this issue?

A TCP GSO packet must be enlarged by bpf_skb_adjust_room() without BPF_F_ADJ_ROOM_FIXED_GSO. The issue occurs when the number of added bytes is at least the packet's current gso_size, causing gso_size to become zero or wrap.

2

Which packet sources are specifically relevant?

The affected gso_size can originate from GRO, from the virtio header of a tun device, or from a packet socket. A packet from a tun device is specifically described as having no frag_list, which can lead to a null-pointer dereference during segmentation.

3

What evidence would indicate that a system has encountered the problem?

The described failure produces a KASAN null-pointer-dereference report in skb_segment(), with tcp_gso_segment(), inet_gso_segment(), and skb_mac_gso_segment() in the call trace. The faulting null address shown is 0x70.

4

What behavior should be avoided until the resolution is applied?

Avoid BPF programs that grow TCP GSO packets with bpf_skb_adjust_room() without BPF_F_ADJ_ROOM_FIXED_GSO when the growth could consume or exceed gso_size. The remaining gso_size must also not fall below TCP_MIN_GSO_SIZE.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203