CVE-2026-143233: xsk: fix list corruption in xsk_buff_add_frag()
In the Linux kernel, the following vulnerability has been resolved:
xsk: fix list corruption in xskbuffaddfrag()
In aligned mode, a fill ring address maps straight to its pool->heads[] entry. If user space posts the same address twice, a driver can pass xskbuffaddfrag() a buffer that is the head of the frame or is already on pool->xskblist or pool->freelist.
Re-adding a linked node corrupts the list. With buffers A, B, C, B, xskrcvzc() emits two descriptors instead of four and leaves the list head pointing at a self-linked B. When the Rx ring later has no room for a frame, the xskbufffree() cleanup follows B into pool->freelist and passes the list head to xpfree():
BUG: kernel NULL pointer dereference, address: 00000000000000c0 RIP: 0010:xpfree+0x1a/0x50 Call Trace: xskrcvzc+0xca/0x200
The head is not on any list and needs a separate check. Adding it as its own frag lets bpfxdpadjusttail() free the in-use head and wrap sinfo->nrfrags to 255.
Reject such buffers before adding them to the frags array, as commit e37b2abca804 ("xsk: fix NULL pointer dereference in xskrcv()") does in the copy path. Callers already drop the frame on failure.
Unaligned mode is not affected, as each fill ring entry gets its own xskb from pool->freeheads[].
Reproduced with a KUnit test feeding synthetic buffers to xskrcvzc(), by Nagato Shiratana.
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
Event History
Frequently Asked Questions
What conditions are required to trigger the fault?
The issue affects aligned mode when user space posts the same fill-ring address more than once. A driver must then pass the duplicated buffer to xsk_buff_add_frag() while it is already the frame head or linked on the pool buffer lists.
What is the practical impact if the condition is reached?
Re-adding the linked buffer corrupts the buffer list. When the receive ring later lacks room for a frame, cleanup can reach xp_free() with an invalid list head and cause a kernel NULL pointer dereference in the xsk_rcv_zc call path.
What can be done before the fix is deployed?
Ensure user space does not post a fill-ring address more than once when using aligned mode. The described condition does not apply to unaligned mode.
How can administrators recognize an affected failure?
A failure may produce a kernel BUG reporting a NULL pointer dereference at xp_free, with xsk_rcv_zc in the call trace. The reported invalid address is 00000000000000c0.
What happens after the fix rejects an invalid buffer?
The invalid buffer is rejected before it is added to the fragment array. Callers already handle this failure by dropping the frame.