AZL-118622: CVE-2026-143344 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: drop multi-buffer frames in XDP mode
stmmacrx() runs the XDP program once per descriptor buffer and uses skb == NULL as the only marker for the start of a frame. A frame larger than one buffer is split by the hardware across several descriptors; GMAC4 enables jumbo frames unconditionally (GMACCONFIGJE in GMACCOREINIT), so an on-link peer can deliver such a frame even when the interface MTU is left at 1500.
When an XDP verdict ends a non-last descriptor, skb is cleared and the next descriptor of the same hardware frame is parsed as a new frame. For XDPCONSUMED this happens via readagain with len preserved, so stmmacrxbuf1len() then returns min(dmabufsz, plen - len) for the last descriptor, which can be as small as 0-3 bytes. buf1len -= ETHFCSLEN underflows and xdppreparebuff() puts dataend far past data; on XDPPASS this produces an skb whose length is close to 4G that reaches the network stack (skb->tail and skb->len are 32-bit and wrap below skb->end, so skboverpanic() does not fire). A 4+ byte tail is instead offered to the XDP program and delivered as a standalone mid-payload Ethernet frame on XDPPASS. XDPTX/XDPREDIRECT instead falls through to the next iteration, resetting the running length, so the tail is re-parsed as a full-size new frame.
The same fault exists when a single descriptor uses its second buffer: buffer2 is now handed to the hardware for non-SPH frames on GMAC4/XGMAC, so a frame up to 2 dmabufsz can land on a single descriptor while the XDP program still only sees the first buffer. XDPTX then transmits a truncated frame, and XDPPASS appends the second buffer only after the program has already run over the first one.
XDP does not support scatter-gather frames until the multi-buffer rework, so drop the whole frame instead. When a non-last descriptor is seen while an XDP program is attached, mark the frame as errored and drain the remaining descriptors, including the last. A descriptor that uses its second buffer is dropped directly before the program runs as well; in XDP mode it is necessarily the last descriptor of the frame, so it does not need the error marker. Removing the re-parse lets both XDP verdict branches simply complete the packet via next.
The buffers consumed by the discard path are no longer returned to the page pool, and the new SG and second-buffer drops do not return them either. They stay in rxq->bufpool[] and stmmacrxrefill() reuses them in place, allocating only when a slot is empty. This is safe because the drop checks run before the buffer is synced for CPU access or prefetched. The discard-path change and the in-place reuse apply with or without an XDP program attached.
The !error guard on the discard check also changes the accounting for errored multi-descriptor frames on dwmac100/dwmac1000: rxerrors is incremented once per frame instead of once per descriptor. This too is independent of XDP mode.
Note: the subsequent "net: stmmac: rework stmmacrx to support XDP rx multi-buff" accumulates the whole frame into a single xdpbuff and supersedes this patch; the fix is kept so the net portion of the series stands on its own.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
kernelto a version that resolves this vulnerability.Patch net: stmmac: drop multi-buffer frames in XDP mode
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the stmmac network driver with XDP enabled are exposed. GMAC4 enables jumbo frames unconditionally, so exposure does not require configuring an MTU larger than 1500.
What does an attacker need to exploit it?
An attacker needs to be an on-link peer capable of sending a frame that the hardware splits across multiple receive descriptors. The issue is triggered when XDP processing reaches a non-final descriptor of such a multi-buffer frame.
What can happen when the issue is triggered?
With XDP_PASS, the driver can create an skb with a length close to 4 GiB and pass it to the network stack. With other XDP outcomes, a remaining tail may be presented to the XDP program or delivered as a standalone mid-payload Ethernet frame.