CVE-2026-99636: net: reject a negative TCP header offset in qdisc_pkt_len_segs_init()
In the Linux kernel, the following vulnerability has been resolved:
net: reject a negative TCP header offset in qdiscpktlensegsinit()
qdiscpktlensegsinit() stores skbtransportoffset(), or the inner offset, in the unsigned hdrlen. A header in front of skb->data gives a negative offset. For an offset a little below zero, pskbmaypull() gets a small length and succeeds. Then a 64-bit kernel reads the TCP header far after the skb and can crash. Further below zero pskbmaypull() fails.
Commit 28a57fb2c5df ("net: iptunnel: fix stale transport header during tunnel decapsulation") fixed one source of such offsets. Other code that removes bytes from the front of a packet can leave the same stale header.
Return SKBDROPREASONSKBBADGSO for a negative offset in the TCP branch. SKBGSOUDPL4 and the other GSO types read no header and still get a wrong qdiscpktlen(). On a 64-bit kernel only packets that cause the read after the skb today get a new result. Then devqueuexmit() drops them and returns -EINVAL, but schhandleingress() ignores the result. Their content can be valid. Thus the code that leaves the header stale needs its own fix.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.7 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 7.3.5-1 - Compensating control
In qdisc_pkt_len_segs_init(), return SKB_DROP_REASON_SKB_BAD_GSO for a negative offset in the TCP branch.
Event History
Frequently Asked Questions
What conditions are needed to trigger the crash-prone behavior?
A packet must reach qdisc_pkt_len_segs_init() with a stale TCP transport-header offset that points before skb->data. Offsets only slightly below zero can cause pskb_may_pull() to succeed and, on 64-bit kernels, lead to a TCP-header read far beyond the skb.
Are all malformed or stale header offsets handled by this fix?
No. The change drops packets with a negative offset in the TCP branch using SKB_DROP_REASON_SKB_BAD_GSO. UDP L4 GSO and other GSO types do not read the header, so they can still receive an incorrect qdisc_pkt_len() when the transport header is stale.
What should be investigated if patching cannot be done immediately?
Identify packet-processing paths that remove bytes from the front of packets, especially tunnel decapsulation or similar transformations, and verify that they update transport-header state. One known source was addressed by the earlier iptunnel stale-transport-header fix, but other such paths may remain.
How does the corrected behavior affect affected packets?
For the TCP case with a negative offset, the packet is dropped. On 64-bit kernels, packets that would otherwise trigger the out-of-bounds header read are dropped by __dev_queue_xmit() with -EINVAL, although sch_handle_ingress() ignores that return value and the packet content itself can be valid.