{"api_version":"1","generated_at":"2026-08-16T07:11:44+00:00","cve":"CVE-2026-74560","urls":{"html":"https://cve.report/CVE-2026-74560","api":"https://cve.report/api/cve/CVE-2026-74560.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-74560","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-74560"},"summary":{"title":"xsk: fix buffer leak in xsk_drop_skb() for AF_XDP multi-buffer Tx","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nxsk: fix buffer leak in xsk_drop_skb() for AF_XDP multi-buffer Tx\n\nThis patch is inspired by the check[1] from sashiko. It says when\noverflow happens, the address of cq to be published is invalid.\nActually the severer thing is the whole process of publishing the\naddress of cq in this particular case is not right: it should truely\npublish the address and advance the cached_prod in cq as long as it\nreads descriptors from txq.\n\nThe following is the full analysis.\nxsk_drop_skb() is called in three places, which all discard a partially\nbuilt multi-buffer skb:\n1) xsk_build_skb() -EOVERFLOW error path: packet exceeds MAX_SKB_FRAGS\n2) __xsk_generic_xmit() post-loop cleanup: an invalid descriptor in\n   the TX ring prevents the partial packet from completing\n3) xsk_release(): socket close while xs->skb holds an incomplete packet\n\nIn all three cases, the TX descriptors for the already-processed frags\nhave been consumed from the TX ring (xskq_cons_release), and CQ slots\nhave been reserved. However, xsk_drop_skb() calls xsk_consume_skb()\nwhich cancels the CQ reservations via xsk_cq_cancel_locked(). Since\nthe buffer addresses never appear in the completion queue, userspace\npermanently loses track of these buffers.\n\nFix this by letting consume_skb() trigger the existing xsk_destruct_skb\ndestructor, which already submits buffer addresses to the CQ via\nxsk_cq_submit_addr_locked().\n\nNote that cancelling the descriptors back to the TX ring (via\nxskq_cons_cancel_n) is not a appropriate option because an oversized\npacket that always exceeds MAX_SKB_FRAGS would be retried indefinitely,\nwhich is an obviously deadlock bug in the TX path.\n\nAlso move the desc->addr assignment in xsk_build_skb() above the\noverflow check so that the current descriptor's address is recorded\nbefore a potential -EOVERFLOW jump to free_err, consistent with the\nzerocopy path in xsk_build_skb_zerocopy().\n\n[1]: https://lore.kernel.org/all/20260425041726.85FB3C2BCB2@smtp.kernel.org/","state":"PUBLISHED","assigner":"Linux","published_at":"2026-08-15 13:18:01","updated_at":"2026-08-15 13:18:01"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/a0528ab6af62bf57153caaf8ea28e5fcb0e18fd4","name":"https://git.kernel.org/stable/c/a0528ab6af62bf57153caaf8ea28e5fcb0e18fd4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/05e283466b86e0b25a5209a3eafe87aa9886064a","name":"https://git.kernel.org/stable/c/05e283466b86e0b25a5209a3eafe87aa9886064a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a3c8382ebce4780c6b3ace2c09bc342313ac0186","name":"https://git.kernel.org/stable/c/a3c8382ebce4780c6b3ace2c09bc342313ac0186","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-74560","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74560","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected cf24f5a5feeaae34c1a34d1e04f8ac697290427a 05e283466b86e0b25a5209a3eafe87aa9886064a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected cf24f5a5feeaae34c1a34d1e04f8ac697290427a a0528ab6af62bf57153caaf8ea28e5fcb0e18fd4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected cf24f5a5feeaae34c1a34d1e04f8ac697290427a a3c8382ebce4780c6b3ace2c09bc342313ac0186 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.44 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1.8 7.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2-rc6 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/xdp/xsk.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"05e283466b86e0b25a5209a3eafe87aa9886064a","status":"affected","version":"cf24f5a5feeaae34c1a34d1e04f8ac697290427a","versionType":"git"},{"lessThan":"a0528ab6af62bf57153caaf8ea28e5fcb0e18fd4","status":"affected","version":"cf24f5a5feeaae34c1a34d1e04f8ac697290427a","versionType":"git"},{"lessThan":"a3c8382ebce4780c6b3ace2c09bc342313ac0186","status":"affected","version":"cf24f5a5feeaae34c1a34d1e04f8ac697290427a","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/xdp/xsk.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.6"},{"lessThan":"6.6","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.44","versionType":"semver"},{"lessThanOrEqual":"7.1.*","status":"unaffected","version":"7.1.8","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.2-rc6","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.44","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1.8","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2-rc6","versionStartIncluding":"6.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nxsk: fix buffer leak in xsk_drop_skb() for AF_XDP multi-buffer Tx\n\nThis patch is inspired by the check[1] from sashiko. It says when\noverflow happens, the address of cq to be published is invalid.\nActually the severer thing is the whole process of publishing the\naddress of cq in this particular case is not right: it should truely\npublish the address and advance the cached_prod in cq as long as it\nreads descriptors from txq.\n\nThe following is the full analysis.\nxsk_drop_skb() is called in three places, which all discard a partially\nbuilt multi-buffer skb:\n1) xsk_build_skb() -EOVERFLOW error path: packet exceeds MAX_SKB_FRAGS\n2) __xsk_generic_xmit() post-loop cleanup: an invalid descriptor in\n   the TX ring prevents the partial packet from completing\n3) xsk_release(): socket close while xs->skb holds an incomplete packet\n\nIn all three cases, the TX descriptors for the already-processed frags\nhave been consumed from the TX ring (xskq_cons_release), and CQ slots\nhave been reserved. However, xsk_drop_skb() calls xsk_consume_skb()\nwhich cancels the CQ reservations via xsk_cq_cancel_locked(). Since\nthe buffer addresses never appear in the completion queue, userspace\npermanently loses track of these buffers.\n\nFix this by letting consume_skb() trigger the existing xsk_destruct_skb\ndestructor, which already submits buffer addresses to the CQ via\nxsk_cq_submit_addr_locked().\n\nNote that cancelling the descriptors back to the TX ring (via\nxskq_cons_cancel_n) is not a appropriate option because an oversized\npacket that always exceeds MAX_SKB_FRAGS would be retried indefinitely,\nwhich is an obviously deadlock bug in the TX path.\n\nAlso move the desc->addr assignment in xsk_build_skb() above the\noverflow check so that the current descriptor's address is recorded\nbefore a potential -EOVERFLOW jump to free_err, consistent with the\nzerocopy path in xsk_build_skb_zerocopy().\n\n[1]: https://lore.kernel.org/all/20260425041726.85FB3C2BCB2@smtp.kernel.org/"}],"providerMetadata":{"dateUpdated":"2026-08-15T12:28:03.912Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/05e283466b86e0b25a5209a3eafe87aa9886064a"},{"url":"https://git.kernel.org/stable/c/a0528ab6af62bf57153caaf8ea28e5fcb0e18fd4"},{"url":"https://git.kernel.org/stable/c/a3c8382ebce4780c6b3ace2c09bc342313ac0186"}],"title":"xsk: fix buffer leak in xsk_drop_skb() for AF_XDP multi-buffer Tx","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-74560","datePublished":"2026-08-15T12:28:03.912Z","dateReserved":"2026-08-15T05:44:03.916Z","dateUpdated":"2026-08-15T12:28:03.912Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-08-15 13:18:01","lastModifiedDate":"2026-08-15 13:18:01","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"74560","Ordinal":"1","Title":"xsk: fix buffer leak in xsk_drop_skb() for AF_XDP multi-buffer T","CVE":"CVE-2026-74560","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"74560","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nxsk: fix buffer leak in xsk_drop_skb() for AF_XDP multi-buffer Tx\n\nThis patch is inspired by the check[1] from sashiko. It says when\noverflow happens, the address of cq to be published is invalid.\nActually the severer thing is the whole process of publishing the\naddress of cq in this particular case is not right: it should truely\npublish the address and advance the cached_prod in cq as long as it\nreads descriptors from txq.\n\nThe following is the full analysis.\nxsk_drop_skb() is called in three places, which all discard a partially\nbuilt multi-buffer skb:\n1) xsk_build_skb() -EOVERFLOW error path: packet exceeds MAX_SKB_FRAGS\n2) __xsk_generic_xmit() post-loop cleanup: an invalid descriptor in\n   the TX ring prevents the partial packet from completing\n3) xsk_release(): socket close while xs->skb holds an incomplete packet\n\nIn all three cases, the TX descriptors for the already-processed frags\nhave been consumed from the TX ring (xskq_cons_release), and CQ slots\nhave been reserved. However, xsk_drop_skb() calls xsk_consume_skb()\nwhich cancels the CQ reservations via xsk_cq_cancel_locked(). Since\nthe buffer addresses never appear in the completion queue, userspace\npermanently loses track of these buffers.\n\nFix this by letting consume_skb() trigger the existing xsk_destruct_skb\ndestructor, which already submits buffer addresses to the CQ via\nxsk_cq_submit_addr_locked().\n\nNote that cancelling the descriptors back to the TX ring (via\nxskq_cons_cancel_n) is not a appropriate option because an oversized\npacket that always exceeds MAX_SKB_FRAGS would be retried indefinitely,\nwhich is an obviously deadlock bug in the TX path.\n\nAlso move the desc->addr assignment in xsk_build_skb() above the\noverflow check so that the current descriptor's address is recorded\nbefore a potential -EOVERFLOW jump to free_err, consistent with the\nzerocopy path in xsk_build_skb_zerocopy().\n\n[1]: https://lore.kernel.org/all/20260425041726.85FB3C2BCB2@smtp.kernel.org/","Type":"Description","Title":"xsk: fix buffer leak in xsk_drop_skb() for AF_XDP multi-buffer T"}]}}}