CVE-2026-139661: bpf, lsm: Reject writes into the BPF LSM program context
bpf, lsm: Reject writes into the BPF LSM program context
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
Reject writes into the BPF LSM program context.
Event History
Frequently Asked Questions
What level of access does an attacker need to exploit this issue?
An attacker needs to be able to load and run a BPF LSM program. Exploitation requires that program to write a chosen scalar into its LSM context, read it back as a verifier-trusted pointer, and pass it to a kfunc or helper that dereferences trusted arguments.
What is the practical impact of successful exploitation?
A malicious BPF LSM program can cause the verifier to treat attacker-controlled data as a trusted pointer to a hook argument. When that pointer is dereferenced by a suitable kfunc or helper, this can produce arbitrary kernel memory access.
How is the issue fixed?
The fix routes BPF LSM context-access validation through bpf_tracing_btf_ctx_access(), which rejects non-read accesses. This prevents stores into the BPF LSM program context from passing verifier validation.