Linux kernel BPF arena race between page free and alloc causes lost writes
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
The Linux kernel from 7.0 before 7.4-rc1 has a race condition in the BPF arena kfunc code. A memory range freed by one operation can be reallocated while stale TLB entries still allow writes into pages about to be freed, so writes made by a BPF program can be lost. The flaw is an ABA problem in arena page management, tracked as a race condition. The sources do not describe an attacker's required privileges or exploitation, and the flaw is not known to be exploited.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix arena race between page free and alloc leading to incoherency Existing arena kfunc code has an underlying race condition that can lead to writes being lost from the BPF program's point of view: a) A memory range gets freed by operation (1), and its range is added back to the arena range tree. b) A concurrent allocation (2) reallocates the range, and does writes to it. Writes from that CPU may follow the stale TLB entries into the pages that are about to be freed. c) (1) invalidates the TLB. The old pages, and any writes done to them, are now inaccessible. zap_pages() similarly removes the mappings for userspace threads. This can be triggered by particularly demanding BPF arena data structures that constantly allocate and deallocate memory, like hash table allocations. Solve this ABA problem by keeping the range allocated until TLB invalidation and unmapping are complete. Under the arena spinlock, claim any free pages in the range and clear its kernel PTEs. Then drop the spinlock, lock and unlock each cleared page to wait for faults that are still installing a user PTE, flush the kernel TLB and zap the user page tables. Finally, retake the spinlock to release the range. Frees serialize on zap_mutex, so an overlapping free cannot release the range early. Claiming the range only allocates a range tree node when the whole range is free, and then there is nothing to free. User faults on a range that is allocated without a page now raise SIGBUS instead of populating it. That covers a range reserved with bpf_arena_reserve_pages() and a range whose kernel PTEs a free has already cleared. Touching a page while a BPF program frees it is a user space bug, and in a BPF_F_SEGV_ON_FAULT arena it already raises SIGSEGV. Sleepable frees run synchronously and are deferred only when the arena spinlock cannot be taken. The deferred free worker retries such a free in place instead of requeueing itself, so the flush_work() in arena_map_free() waits for all of its work.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Upgrade the Linux kernel to 7.3.6 or 7.4-rc1 or later.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA Linux (Linux) Fixed in 7.3.6, 7.4-rc1
Timeline
- 2026-11-30 Threatist record created from CVE-2026-139269
- 2026-11-30 Alias added: GHSA-qpmm-hj84-fmwm
References
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-139269 · CVE Program
- CVE-2026-139269 · NVD
- GHSA-qpmm-hj84-fmwm · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences