# CVE-2026-139308: bpf: Fix stale offload->prog pointer after realloc


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 30 Nov 2026
- **Updated:** 30 Nov 2026
- **Also known as:** AZL-117043, BELL-CVE-2026-139308, DEBIAN-CVE-2026-139308, GHSA-vg7c-chf6-g55j, UBUNTU-CVE-2026-139308

## What is CVE-2026-139308?

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

### Official description

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

bpf: Fix stale offload->prog pointer after realloc

bpf_prog_realloc() moves a program that the rewrites of the verifier make
outgrow its pages.  It updates aux->prog, but not the offload->prog of a
device-bound program.  When the device is unregistered,
__bpf_offload_dev_netdev_unregister() hands the stale pointer to
__bpf_prog_offload_destroy(), which faults on the freed program:

  BUG: unable to handle page fault for address: ffffc90000071050
  RIP: 0010:__bpf_prog_offload_destroy+0x3f/0x310

It takes the right to load a device-bound XDP program, CAP_BPF and
CAP_NET_ADMIN or a BPF token, and a device that can be removed.

Commit a1aa9ef47c29 ("bpf: Fix stale offload->prog pointer after constant
blinding") repaired the other place that replaces a program.  Do the same
here.

Nothing keeps the device while a program is loaded, so it can also be
unregistered at that very moment.  That frees the offload, and it may have
read offload->prog already when the old copy of the program is freed.  In
both places update the pointer under bpf_devs_lock, before the old copy
goes.

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


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

Upgrade to a fixed version.

## Is CVE-2026-139308 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-139308 is a vulnerability in Linux, published on 30 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-139308 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-139308/ (Markdown: https://insights.sbomify.com/CVE-2026-139308/index.md)
```

## Sources

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

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