# CVE-2026-139635: bpf: Keep target extended until its last freplace link detaches

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-11-30T13:36:34.327Z
- **Modified:** 2026-11-30T14:19:46.757Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker with local BPF access could re-arm an unbounded tail call loop in the Linux kernel by detaching one of two freplace links on the same target program.

## Who should check

- Anyone running Linux \>= 987aa730bad3e1ef66d9f30182294daa78f6387d, \< 49e6b0de165005abfbd167ba5e62076a4898b85e; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< 0743d6510161be50143e52cb91fccd4868f7f048; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< 6403c2d2503edda61c24b75b178b62b558232a59; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< c43c348a84460b003fa757dd43d8c89848ae220d; 272f92998cbec9e12fea8ef28f48d6b1bc625a34; f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6; \>= 6.12.5, \< 6.12.120; \>= 6.1.191, \< 6.2; \>= 6.6.160, \< 6.7
- Anyone running Linux 6.13

## Description

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

bpf: Keep target extended until its last freplace link detaches

The is\_extended / prog\_array\_member\_cnt protocol introduced by commit
d6083f040d5d ("bpf: Prevent tailcall infinite loop caused by freplace")
keeps a prog extended by a freplace program out of prog\_array maps, and
vice versa: once a tail call re-enters an extended subprogram, its
tail\_call\_cnt resets on every execution and the loop never terminates.

But is\_extended is a plain boolean, while one target prog can carry
several freplace links at the same time, one on its entry and one on a
global subprogram.  \_\_bpf\_trampoline\_unlink\_prog() cleared is\_extended
whenever \*any\* freplace link detached, so detaching one of two links
re-armed the unbounded loop through the remaining one.

Replace the is\_extended boolean with a count of the freplace links
attached to each target prog, so the target stays extended until its
last link detaches.  Also rename bpf\_freplace\_check\_tgt\_prog() to
bpf\_freplace\_link\_tgt\_prog(), as the helper has never been a pure
check: it reserves the target prog on success.

## Affected and fixed versions

- Linux: \>= 987aa730bad3e1ef66d9f30182294daa78f6387d, \< 49e6b0de165005abfbd167ba5e62076a4898b85e; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< 0743d6510161be50143e52cb91fccd4868f7f048; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< 6403c2d2503edda61c24b75b178b62b558232a59; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< c43c348a84460b003fa757dd43d8c89848ae220d; 272f92998cbec9e12fea8ef28f48d6b1bc625a34; f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6; \>= 6.12.5, \< 6.12.120; \>= 6.1.191, \< 6.2; \>= 6.6.160, \< 6.7 (cvelist)
- Linux: 6.13 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 6.7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-139635. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-139635.md
Affected: Linux >= 987aa730bad3e1ef66d9f30182294daa78f6387d, < 49e6b0de165005abfbd167ba5e62076a4898b85e; >= d6083f040d5d8f8d748462c77e90547097df936e, < 0743d6510161be50143e52cb91fccd4868f7f048; >= d6083f040d5d8f8d748462c77e90547097df936e, < 6403c2d2503edda61c24b75b178b62b558232a59; >= d6083f040d5d8f8d748462c…
Fixed in: Linux 49e6b0de165005abfbd167ba5e62076a4898b85e, Linux 0743d6510161be50143e52cb91fccd4868f7f048, Linux 6403c2d2503edda61c24b75b178b62b558232a59, Linux 6.12.120, Linux 6.2, Linux 6.7

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-139635 being exploited?

There is no confirmed exploitation: CVE-2026-139635 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-139635?

It has no CVSS score yet. Unknown.

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

Linux \>= 987aa730bad3e1ef66d9f30182294daa78f6387d, \< 49e6b0de165005abfbd167ba5e62076a4898b85e; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< 0743d6510161be50143e52cb91fccd4868f7f048; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< 6403c2d2503edda61c24b75b178b62b558232a59; \>= d6083f040d5d8f8d748462c77e90547097df936e, \< c43c348a84460b003fa757dd43d8c89848ae220d; 272f92998cbec9e12fea8ef28f48d6b1bc625a34; f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6; \>= 6.12.5, \< 6.12.120; \>= 6.1.191, \< 6.2; \>= 6.6.160, \< 6.7; Linux 6.13.

### Is there a fix for CVE-2026-139635?

Yes. Fixed in Linux 49e6b0de165005abfbd167ba5e62076a4898b85e, Linux 0743d6510161be50143e52cb91fccd4868f7f048, Linux 6403c2d2503edda61c24b75b178b62b558232a59, Linux 6.12.120, Linux 6.2, Linux 6.7. Upgrade Linux to 6.7 or later.

### How do I check if I'm affected by CVE-2026-139635?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/49e6b0de165005abfbd167ba5e62076a4898b85e>
- other: <https://git.kernel.org/stable/c/0743d6510161be50143e52cb91fccd4868f7f048>
- other: <https://git.kernel.org/stable/c/6403c2d2503edda61c24b75b178b62b558232a59>
- other: <https://git.kernel.org/stable/c/c43c348a84460b003fa757dd43d8c89848ae220d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-139635>

HTML: <https://flawdb.com/CVE-2026-139635> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-139635>
