Linux kernel memory corruption in BPF hash map updates
- Exploited
- No known exploitation
- Fix
- No fix listed
- Who is exposed
- Not reported
Summary
In the Linux kernel's BPF hash map code, an update to a preallocated map can leave bucket lists corrupted when an NMI or a tracing program updates another key in the same map during that update. The result can be a kernel crash from an invalid memory access, or lookups in the affected bucket that never finish and stall the CPU.
Written by a model
Original 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.
What to do
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-139323 (bpf: Don't hand out a linked element as extra element), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-139323 (entry last updated 2026-11-30):
Affected:
- Linux Linux: version range not reported
- Linux Linux: versions 4.11
Fixed versions: none listed yet.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-139323 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-139323 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://git.kernel.org/stable/c/45dfd3617c74ffff6633d136815f193597a817cd
- https://git.kernel.org/stable/c/00ea598142f5bdf6c4f3da2f8e66cbbd2ec2c60d
- https://git.kernel.org/stable/c/103d8a81021b1d7dbec91c339d5b5b7a4184aa89
- https://git.kernel.org/stable/c/ccb88db8dac8fabde58656d5d4a33711e89c480a
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-139323
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-139323"}.Affected versions
- Linux LinuxVersion range not reported
- Linux Linux4.11
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure?/25Unknown. No advisory context yet
- Reach20/20Affects Linux kernel (software on nearly every server, desktop or phone)
- Severity?/10Unknown. No CVSS score or vendor rating
- No patch5/5No patch listed yet
What would change the score
- Would score about 80 if added to CISA KEV
- Would score about 75 if CISA's SSVC rates exploitation active
- Would score about 47 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 6
| Kind | Source |
|---|---|
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-139323 |
| Record | NVD · CVE-2026-139323 |
| Other links 4 | |
| Link | git.kernel.org · stable/c/45dfd3617c74ffff6633d136815f193597a817cd |
| Link | git.kernel.org · stable/c/00ea598142f5bdf6c4f3da2f8e66cbbd2ec2c60d |
| Link | git.kernel.org · stable/c/103d8a81021b1d7dbec91c339d5b5b7a4184aa89 |
| Link | git.kernel.org · stable/c/ccb88db8dac8fabde58656d5d4a33711e89c480a |
Questions about CVE-2026-139323
Is CVE-2026-139323 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-139323?
Linux: version 4.11.
Source: cve.now feed data
Related
- CVE-2026-139801KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM
- CVE-2026-1398009p/xen: drain response work after unbinding IRQ
- CVE-2026-139799mm/shmem: hold off eviction in shmem_writeout()
- CVE-2026-139798mm: do not unintentionally overwrite atomic VMA flags
- CVE-2026-139797ocfs2/cluster: hold a reference on the heartbeat thread
- CVE-2026-139796ocfs2/heartbeat: serialize concurrent writes to a region's dev attribute
No corrections so far. Something wrong on this page? Report an error.