CVE-2026-143341: net: stmmac: fix XDP RX buffer DMA sync length
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: fix XDP RX buffer DMA sync length
stmmacrx() bounded the DMA sync length by the largest dataend seen before and after the XDP program and passed it to pagepoolputpage() on the XDPCONSUMED path. bpfxdpadjusttail() zeroes the grown area, which dirties the CPU cache, but a later negative adjust only moves dataend back. If the program grows and then shrinks the tail, both endpoints miss the zeroed range, so those dirty cache lines are not written back before the page is reused.
The length was also wrong since commit 88095728511e ("net: stmmac: fix rx Scatter-Gather support") moved the pagepool DMA window to offset 0 and set maxlen to dmabufsz + pageoffset: the driver still subtracted buf->pageoffset, so it synced [base, dataend - pageoffset) instead of [base, dataend).
On a non-coherent platform those dirty lines can be evicted after the device has DMA'd the next frame into the recycled page and corrupt it.
Sync the whole pagepool DMA window on the XDPCONSUMED path with pagepoolrecycledirect(), as the PASS path and pagepool allocation already do. The device only writes [pageoffset, pageoffset + dmabufsz), so syncing [base, base + maxlen) covers every cache line it can touch, regardless of how the program adjusted the packet.
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.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch net: stmmac: fix XDP RX buffer DMA sync length
Event History
Frequently Asked Questions
Which XDP execution path is implicated?
The issue is on the XDP_CONSUMED path when the receive page is recycled. The PASS path already synchronizes the page_pool DMA window.
What XDP program behavior can trigger the stale-cache condition?
An XDP program can grow the packet tail with bpf_xdp_adjust_tail(), which zeroes and dirties the added area, and then shrink the tail with a negative adjustment. The final data endpoints can then exclude the dirty zeroed range from the synchronization length.
Which platforms are at risk of frame corruption?
The described corruption occurs on non-coherent platforms. Dirty CPU cache lines from the recycled page may be evicted after the device has DMA-written a subsequent frame into that page, corrupting that frame.