CVE-2026-139323
bpf: Don't hand out a linked element as extra element
Check your servers for CVE-2026-139323
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-139323 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Don't hand out a linked element as extra element
When htab_map_update_elem() replaces an element of a preallocated map, alloc_htab_elem() takes the spare element of this cpu and puts the old element into the per-cpu slot right away, long before the old element is unlinked from its bucket. The bucket lock disables interrupts, but it does not keep out an NMI, or a tracing program on the return of alloc_htab_elem(). bpf_prog_active only helps if both programs are kprobe, tracepoint or perf_event programs. A program that updates an existing key in another bucket of the same map gets to use the slot:
htab_map_update_elem(k1) tc, xdp, fentry, raw_tp, ... alloc_htab_elem() l_new = *pl_new *pl_new = l_old still linked in bucket 1 <NMI> htab_map_update_elem(k2) perf_event program l_new = *pl_new the l_old of the outer update hlist_nulls_add_head_rcu(l_new, bucket 2) hlist_nulls_del_rcu(k2's old element) </NMI> hlist_nulls_add_head_rcu(l_new, bucket 1) hlist_nulls_del_rcu(l_old)
If l_old was the first element of bucket 1, the outer add points its pprev at l_new, and the delete takes it out of bucket 1 only. l_new->next now leads into bucket 2, where l_old stays with a poisoned pprev, on which a delete of k2 crashes. If it was not the first, the delete takes it out of bucket 2: k2 is gone from the map, and the chain of bucket 1 still contains l_old, whose next pointer leads into bucket 2.
Either way a walk of bucket 1 ends on the nulls value of bucket 2. lookup_nulls_elem_raw() restarts whenever that happens, so every lookup in bucket 1 which does not find its key spins forever:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: __htab_map_lookup_elem+0x354/0x4d0
BUG: KASAN: wild-memory-access in htab_map_delete_elem+0x30c/0x670 Write of size 8 at addr dead000000000122 by task extra/102
An NMI between the load and the store of the slot makes both updates use the same element, with much the same result.
Empty the slot when the spare element is taken, in a way that is atomic on this cpu, and put the old element in only after it has been unlinked and its timers and the like have been cancelled. A nested update that finds the slot empty, which is the case that corrupted the map, fails with -EBUSY.
Exploitation
EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.6% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 8c290e60fa2a51806159522331c9ed41252a8fb3, before 45dfd3617c74ffff6633d136815f193597a817cd affected from 8c290e60fa2a51806159522331c9ed41252a8fb3, before 00ea598142f5bdf6c4f3da2f8e66cbbd2ec2c60d affected from 8c290e60fa2a51806159522331c9ed41252a8fb3, before 103d8a81021b1d7dbec91c339d5b5b7a4184aa89 affected from 8c290e60fa2a51806159522331c9ed41252a8fb3, before ccb88db8dac8fabde58656d5d4a33711e89c480a
Other versions: unaffected
|
| Linux |
affected 4.11 unaffected before 4.11 unaffected from 6.12.120 up to and including 6.12.* unaffected from 6.18.66 up to and including 6.18.* unaffected from 7.3.6 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-139323 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139323
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-139323
trivy image --scanners vuln IMAGE | grep CVE-2026-139323
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/45dfd3617c74ffff6633d136815f193597a817cd git.kernel.org
- https://git.kernel.org/stable/c/00ea598142f5bdf6c4f3da2f8e66cbbd2ec2c60d git.kernel.org
- https://git.kernel.org/stable/c/103d8a81021b1d7dbec91c339d5b5b7a4184aa89 git.kernel.org
- https://git.kernel.org/stable/c/ccb88db8dac8fabde58656d5d4a33711e89c480a git.kernel.org
Source: the record CVE-2026-139323 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse