{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37920","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T04:51:23.968Z","datePublished":"2025-05-20T15:21:49.685Z","dateUpdated":"2026-08-05T11:58:21.871Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:58:21.871Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nxsk: Fix race condition in AF_XDP generic RX path\n\nMove rx_lock from xsk_socket to xsk_buff_pool.\nFix synchronization for shared umem mode in\ngeneric RX path where multiple sockets share\nsingle xsk_buff_pool.\n\nRX queue is exclusive to xsk_socket, while FILL\nqueue can be shared between multiple sockets.\nThis could result in race condition where two\nCPU cores access RX path of two different sockets\nsharing the same umem.\n\nProtect both queues by acquiring spinlock in shared\nxsk_buff_pool.\n\nLock contention may be minimized in the future by some\nper-thread FQ buffering.\n\nIt's safe and necessary to move spin_lock_bh(rx_lock)\nafter xsk_rcv_check():\n* xs->pool and spinlock_init is synchronized by\n  xsk_bind() -> xsk_is_bound() memory barriers.\n* xsk_rcv_check() may return true at the moment\n  of xsk_release() or xsk_unbind_dev(),\n  however this will not cause any data races or\n  race conditions. xsk_unbind_dev() removes xdp\n  socket from all maps and waits for completion\n  of all outstanding rx operations. Packets in\n  RX path will either complete safely or drop."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Exploitation requires the attacker to locally establish the vulnerable configuration — create two AF_XDP sockets, register a umem, bind both with XDP_SHARED_UMEM to the same device/queue_id, and attach a generic-XDP program redirecting into an xskmap. Although the race is sprung by packet reception, a purely remote attacker cannot create that state, so the attack vector is local.\nAC:L - The attacker controls both sides of the race: it creates both sockets sharing the single xsk_buff_pool, and generic XDP runs from the per-CPU backlog in __netif_receive_skb_core(), so sending traffic over veth/lo from threads pinned to different CPUs puts multiple CPUs into xsk_generic_rcv() concurrently on rxq index 0. No condition outside the attacker's influence is required, and the free_list_cnt u32 underflow makes the corrupted state persist across packets.\nPR:L - xsk_create() only requires ns_capable(net->user_ns, CAP_NET_RAW), which an unprivileged user obtains via unshare -Urn; XDP attach needs CAP_NET_ADMIN, also user-namespace reachable. BPF program load needs CAP_BPF — an explicitly non-root delegated capability routinely granted to containers and AF_XDP dataplane workloads — so this is a low-privileged local user, not real root in the initial namespace.\nUI:N - The attacker performs the entire sequence itself — socket setup, XDP attach, and traffic generation — with no action required from any other user or administrator.\nS:U - The corrupted objects (xsk_buff_pool, its free_list/free_heads arrays, adjacent slab memory) all live within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The fill-ring consumer race hands the same umem address and the same pool->heads[] xdp_buff_xsk to two sockets, and the empty-free_list case manufactures an xdp_buff_xsk whose data_hard_start is read from memory preceding the pool allocation; the resulting frames are surfaced to userspace through the mmap'd RX rings, leaking kernel memory. The same corruption is leverageable into a broader arbitrary-read primitive.\nI:H - The bug yields wild writes with attacker-controlled packet payload (memcpy through a data_hard_start read out of bounds), clobbers pool->xsk_tx_list.next, corrupts the shared free_list via concurrent list_add(), and overflows free_heads_cnt past the flexible array at the end of the pool allocation — a heap overflow with attacker-influenced contents, sufficient for control-flow hijack.\nA:H - The multi-buffer path dereferences xsk_buff_alloc()'s return without a NULL check after the racy xsk_buff_can_alloc() TOCTOU, producing a NULL-pointer write in softirq context; linked-list corruption, counter underflow, and double-ownership of buffers likewise cause oopses and panics."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/net/xdp_sock.h","include/net/xsk_buff_pool.h","net/xdp/xsk.c","net/xdp/xsk_buff_pool.c"],"versions":[{"version":"bf0bdd1343efbbf65b4d53aef1fce14acbd79d50","lessThan":"975b372313dc018b9bd6cc0d85d188787054b19e","status":"affected","versionType":"git"},{"version":"bf0bdd1343efbbf65b4d53aef1fce14acbd79d50","lessThan":"b6978c565ce33658543c637060852434b4248d30","status":"affected","versionType":"git"},{"version":"bf0bdd1343efbbf65b4d53aef1fce14acbd79d50","lessThan":"65d3c570614b892257dc58a1b202908242ecf8fd","status":"affected","versionType":"git"},{"version":"bf0bdd1343efbbf65b4d53aef1fce14acbd79d50","lessThan":"75a240a3e8abf17b9e00b0ef0492b1bbaa932251","status":"affected","versionType":"git"},{"version":"bf0bdd1343efbbf65b4d53aef1fce14acbd79d50","lessThan":"a1356ac7749cafc4e27aa62c0c4604b5dca4983e","status":"affected","versionType":"git"},{"version":"fd7c22ba7a0ad898b9ecf77dd53f5ccc48492e35","status":"affected","versionType":"git"},{"version":"8a090e3b73eaffe18e08ccc3fb5abecf6b0a9781","status":"affected","versionType":"git"},{"version":"5.1.20","lessThan":"5.2","status":"affected","versionType":"semver"},{"version":"5.2.3","lessThan":"5.3","status":"affected","versionType":"semver"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/net/xdp_sock.h","include/net/xsk_buff_pool.h","net/xdp/xsk.c","net/xdp/xsk_buff_pool.c"],"versions":[{"version":"5.3","status":"affected"},{"version":"0","lessThan":"5.3","status":"unaffected","versionType":"semver"},{"version":"6.1.164","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.123","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.28","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.14.6","lessThanOrEqual":"6.14.*","status":"unaffected","versionType":"semver"},{"version":"6.15","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.1.164"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.6.123"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.12.28"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.14.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1.20"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2.3"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/975b372313dc018b9bd6cc0d85d188787054b19e"},{"url":"https://git.kernel.org/stable/c/b6978c565ce33658543c637060852434b4248d30"},{"url":"https://git.kernel.org/stable/c/65d3c570614b892257dc58a1b202908242ecf8fd"},{"url":"https://git.kernel.org/stable/c/75a240a3e8abf17b9e00b0ef0492b1bbaa932251"},{"url":"https://git.kernel.org/stable/c/a1356ac7749cafc4e27aa62c0c4604b5dca4983e"}],"title":"xsk: Fix race condition in AF_XDP generic RX path","x_generator":{"engine":"bippy-1.2.0"}}}}