Linux kernel BPF LSM verifier accepts writes into program context
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
The Linux kernel from 5.7 accepts store instructions into the context of BPF LSM programs, although the verifier should reject them. A BPF program can store a scalar into a context slot and read it back as a trusted pointer of the hook's argument type, which a kernel function that dereferences trusted arguments can turn into arbitrary kernel access.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Fixed versions of the Linux kernel are 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6 and 7.4-rc1.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA Linux (Linux) Fixed in 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6, 7.4-rc1
Timeline
- 2026-11-30 Threatist record created from CVE-2026-139661
- 2026-11-30 Alias added: GHSA-3j5p-3rwj-858c
References
Other 7
- https://git.kernel.org/stable/c/6b810a303806b3a48c0d8cec99468956d15b8069
- https://git.kernel.org/stable/c/23fd50ed3ae8ff501e90db8b253ee05992a0b563
- https://git.kernel.org/stable/c/ad74f678b76e9460193afc1683ba50ae5d2f6400
- https://git.kernel.org/stable/c/d37ac6eda751255a96a46737abbb526ada2a1017
- https://git.kernel.org/stable/c/ab9f32e30ac4087a72070d8cc33809c02797e8ef
- https://git.kernel.org/stable/c/63fa671681dc8f10d1f21032bc6da1c3398c782b
- https://git.kernel.org/stable/c/c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-139661 · CVE Program
- CVE-2026-139661 · NVD
- GHSA-3j5p-3rwj-858c · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences