# CVE-2026-139661: bpf, lsm: Reject writes into the BPF LSM program context

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

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker running a crafted BPF LSM program can write to the context and then read it back as a trusted pointer, enabling arbitrary kernel memory access in the Linux kernel.

## Who should check

- Anyone running Linux \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 6b810a303806b3a48c0d8cec99468956d15b8069; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 23fd50ed3ae8ff501e90db8b253ee05992a0b563; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< ad74f678b76e9460193afc1683ba50ae5d2f6400; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< d37ac6eda751255a96a46737abbb526ada2a1017; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< ab9f32e30ac4087a72070d8cc33809c02797e8ef; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 63fa671681dc8f10d1f21032bc6da1c3398c782b; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1
- Anyone running Linux 5.7

## Description

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

bpf, lsm: Reject writes into the BPF LSM program context

The verifier types a load from a tracing-style context by its offset
alone: btf\_ctx\_access() looks the offset up in the attach hook's
prototype, and check\_mem\_access() stamps the resulting type onto the
destination register. Nothing tracks what the slot actually holds.
That is sound only as long as the context is read-only, and for BPF LSM
it is not. lsm\_verifier\_ops wires -\>is\_valid\_access() straight to
btf\_ctx\_access(), which never looks at enum bpf\_access\_type, so a store
into the context passes verification. Every other user of the helper
either goes through bpf\_tracing\_btf\_ctx\_access() or open-codes the same
type != BPF\_READ test first; BPF LSM is the only one that does neither.

A program can therefore store a scalar of its choosing into a context
slot, read the slot back, and get a register the verifier believes is a
trusted pointer of the hook's argument type. Handing that to a kfunc or
helper which dereferences a trusted argument turns it into an arbitrary
kernel access. Route BPF LSM through bpf\_tracing\_btf\_ctx\_access() like
everyone else.

## Affected and fixed versions

- Linux: \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 6b810a303806b3a48c0d8cec99468956d15b8069; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 23fd50ed3ae8ff501e90db8b253ee05992a0b563; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< ad74f678b76e9460193afc1683ba50ae5d2f6400; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< d37ac6eda751255a96a46737abbb526ada2a1017; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< ab9f32e30ac4087a72070d8cc33809c02797e8ef; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 63fa671681dc8f10d1f21032bc6da1c3398c782b; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1 (cvelist)
- Linux: 5.7 (cvelist)

## Technologies

Linux kernel

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-139661.md
Affected: Linux >= fc611f47f2188ade2b48ff6902d5cce8baac0c58, < 6b810a303806b3a48c0d8cec99468956d15b8069; >= fc611f47f2188ade2b48ff6902d5cce8baac0c58, < 23fd50ed3ae8ff501e90db8b253ee05992a0b563; >= fc611f47f2188ade2b48ff6902d5cce8baac0c58, < ad74f678b76e9460193afc1683ba50ae5d2f6400; >= fc611f47f2188ade2b48ff6…
Fixed in: Linux 6b810a303806b3a48c0d8cec99468956d15b8069, Linux 23fd50ed3ae8ff501e90db8b253ee05992a0b563, Linux 63fa671681dc8f10d1f21032bc6da1c3398c782b

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-139661 being exploited?

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 6b810a303806b3a48c0d8cec99468956d15b8069; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 23fd50ed3ae8ff501e90db8b253ee05992a0b563; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< ad74f678b76e9460193afc1683ba50ae5d2f6400; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< d37ac6eda751255a96a46737abbb526ada2a1017; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< ab9f32e30ac4087a72070d8cc33809c02797e8ef; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< 63fa671681dc8f10d1f21032bc6da1c3398c782b; \>= fc611f47f2188ade2b48ff6902d5cce8baac0c58, \< c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1; Linux 5.7.

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

Yes. Fixed in Linux 6b810a303806b3a48c0d8cec99468956d15b8069, Linux 23fd50ed3ae8ff501e90db8b253ee05992a0b563, Linux 63fa671681dc8f10d1f21032bc6da1c3398c782b. No fix listed yet: follow the vendor advisory.

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

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/6b810a303806b3a48c0d8cec99468956d15b8069>
- other: <https://git.kernel.org/stable/c/23fd50ed3ae8ff501e90db8b253ee05992a0b563>
- other: <https://git.kernel.org/stable/c/ad74f678b76e9460193afc1683ba50ae5d2f6400>
- other: <https://git.kernel.org/stable/c/d37ac6eda751255a96a46737abbb526ada2a1017>
- other: <https://git.kernel.org/stable/c/ab9f32e30ac4087a72070d8cc33809c02797e8ef>
- other: <https://git.kernel.org/stable/c/63fa671681dc8f10d1f21032bc6da1c3398c782b>
- other: <https://git.kernel.org/stable/c/c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1>

## 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-139661>

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