In the Linux kernel, the following vulnerability has been resolved:
xsk: fix buffer leak in xskdropskb() for AF_XDP multi-buffer Tx
This patch is inspired by the check[1] from sashiko. It says when overflow happens, the address of cq to be published is invalid. Actually the severer thing is the whole process of publishing the address of cq in this particular case is not right: it should truely publish the address and advance the cached_prod in cq as long as it reads descriptors from txq.
The following is the full analysis. xskdropskb() is called in three places, which all discard a partially built multi-buffer skb: 1) xskbuildskb() -EOVERFLOW error path: packet exceeds MAXSKBFRAGS 2) _xskgenericxmit() post-loop cleanup: an invalid descriptor in the TX ring prevents the partial packet from completing 3) xskrelease(): socket close while xs->skb holds an incomplete packet
In all three cases, the TX descriptors for the already-processed frags have been consumed from the TX ring (xskqconsrelease), and CQ slots have been reserved. However, xskdropskb() calls xskconsumeskb() which cancels the CQ reservations via xskcqcancel_locked(). Since the buffer addresses never appear in the completion queue, userspace permanently loses track of these buffers.
Fix this by letting consumeskb() trigger the existing xskdestructskb destructor, which already submits buffer addresses to the CQ via xskcqsubmitaddr_locked().
Note that cancelling the descriptors back to the TX ring (via xskqconscanceln) is not a appropriate option because an oversized packet that always exceeds MAXSKB_FRAGS would be retried indefinitely, which is an obviously deadlock bug in the TX path.
Also move the desc->addr assignment in xskbuildskb() above the overflow check so that the current descriptor's address is recorded before a potential -EOVERFLOW jump to freeerr, consistent with the zerocopy path in xskbuildskbzerocopy().
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/74xxx/CVE-2026-74560.json"
}