CVE-2026-139188: net: harden qdisc_pkt_len_segs_init() against malicious GSO packets
In the Linux kernel, the following vulnerability has been resolved:
net: harden qdiscpktlensegsinit() against malicious GSO packets
An SKBGSODODGY packet can carry untrusted gsosize and headers.
For instance, gsosize=1 and hdrlen=65532 for a 524275-byte frame makes qdiscpktlensegsinit() compute an accounted length of about 4,294,574,091 bytes (after gsosegs silently wrapped in a u16).
With DRR quantum 256, the dequeue path then needs ~16.8 million deficit refills before it can dequeue the skb, keeping the CPU in the qdisc path long enough to trigger the soft-lockup watchdog.
Commit 8f735d64382d ("net/sched: bound qdiscpktlen to prevent qdisc soft lockup") added QDISCPKTLENMAX to bound size table amplification. Use the same bound for DODGY packets:
- Make gsosegs a u32 and drop packets whose segment count does not fit GSOMAXSEGS, instead of silently truncating it.
- Drop packets whose estimated qdiscpktlen() would exceed QDISCPKTLENMAX.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In qdisc_pkt_len_segs_init(), bound estimated packet length to QDISC_PKT_LEN_MAX, including for SKB_GSO_DODGY packets; use a u32 for gso_segs and drop packets whose segment count exceeds GSO_MAX_SEGS.
Event History
Frequently Asked Questions
What packet characteristics are needed to trigger the excessive dequeue work?
The condition involves an SKB_GSO_DODGY packet with untrusted GSO metadata, such as a very small gso_size and a large header length. The example uses gso_size of 1 and hdr_len of 65532 on a 524275-byte frame, causing the segment count to wrap and the accounted length to become extremely large.
What is the observable impact on an affected system?
With a DRR quantum of 256, the dequeue path can require roughly 16.8 million deficit refills before it can dequeue the packet. This can keep a CPU in the qdisc path long enough for the soft-lockup watchdog to trigger.
What does the fix do to prevent the condition?
The fix uses a u32 for gso_segs and drops packets whose segment count exceeds GSO_MAX_SEGS rather than silently truncating the count. It also drops DODGY packets whose estimated qdisc packet length exceeds QDISC_PKT_LEN_MAX.