# CVE-2026-139547: bpf: arena: Allocate the fault-in page outside the lock


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 30 Nov 2026
- **Updated:** 2 Dec 2026
- **Also known as:** AZL-117217, BELL-CVE-2026-139547, DEBIAN-CVE-2026-139547, GHSA-4fg9-pxwp-6xg7, UBUNTU-CVE-2026-139547

## What is CVE-2026-139547?

CVE-2026-139547 is a vulnerability in Linux, published on 30 Nov 2026. 

### Official description

In the Linux kernel, the following vulnerability has been resolved:

bpf: arena: Allocate the fault-in page outside the lock

arena_vm_fault() allocated the page while holding arena->spinlock, so it
could only use the non-blocking allocator, which never reclaims. Once the
memcg is at memory.max that allocation just fails, the fault turns into
VM_FAULT_SIGSEGV, and the process gets a SIGSEGV on a perfectly valid
arena address. Hitting memory.max is routine (e.g. page cache from
reading a big file), so this kills innocent processes over memory that
reclaim could have freed.

Rework the fault handler:

- Preallocate the page before taking the lock, like do_anonymous_page()
  does, so it can sleep and reclaim, instead of turning a routine
  memory.max into a fake segfault. The allocation uses
  __GFP_RETRY_MAYFAIL so it never invokes the OOM killer: the page is
  charged to the map's memcg, which need not be the faulting task's, so
  an OOM there could kill unrelated tasks in the map's cgroup while a
  foreign faulter could never be its victim. map->numa_node is always
  NUMA_NO_NODE for an arena (BPF_F_NUMA_NODE is rejected), so the page
  comes from the local node, as before.

- On allocation failure fall through to the locked recheck rather than
  failing right away: a page a concurrent allocator installed meanwhile
  is used, otherwise the non-blocking fallback fails and we return
  VM_FAULT_SIGBUS. Not VM_FAULT_OOM: nothing ran the OOM killer, and the
  fault path would just retry it forever.

- A lockless probe skips that preallocation when a page is already mapped
  (e.g. allocated by the bpf program), so the common case wastes no
  allocation. The rare race where such a page is freed before we take the
  lock falls back to the non-blocking allocator under the lock.

- Return VM_FAULT_SIGBUS for the other non-recoverable errors
  (allocation, range-tree and page-table failures) instead of
  VM_FAULT_SIGSEGV; the lock failure already did. Only
  BPF_F_SEGV_ON_FAULT, and a scratch-page hole under that flag, is a
  real user addressing error and keeps VM_FAULT_SIGSEGV.

- Tidy up the error labels.

## Which versions are affected by CVE-2026-139547?


## How do I fix CVE-2026-139547?

Upgrade to a fixed version.

## Is CVE-2026-139547 being exploited?

There is no known exploitation of CVE-2026-139547 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-139547 and fix it if it is affected.

What it is: CVE-2026-139547 is a vulnerability in Linux, published on 30 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-139547 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-139547/ (Markdown: https://insights.sbomify.com/CVE-2026-139547/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-139547
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-139547
- OSV: https://osv.dev/vulnerability/CVE-2026-139547

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-139547/
Summaries are generated and may contain mistakes; the official description above is the record.
