CVE-2026-139297: bpf: Don't let an extension reach further into the context than its target
bpf: Don't let an extension reach further into the context than its target
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - 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 attachment of a BPF extension when its max_ctx_offset exceeds the max_ctx_offset of the target program.
Event History
Frequently Asked Questions
Which BPF uses are exposed to this issue?
The issue affects BPF program extensions associated with raw tracepoints, tracepoints, or syscall programs when an extension can access more of the context than the program it extends. It can also occur during BPF test runs when the extension reads beyond the supplied context.
What condition is required to trigger the out-of-bounds read?
An extension, including an extension of one of the target program's global functions, must have a max_ctx_offset greater than that of its target program. The target program must not itself touch as much context as its extension reaches.
What evidence could indicate that the issue has been triggered?
KASAN may report stack-out-of-bounds or slab-out-of-bounds reads from the generated BPF extension program. The invalid read may access memory behind tracepoint arguments, memory beyond a test-run context, or NULL when no context is present.
What does the resolved behavior do differently?
The fix refuses attachment of an extension that reaches further into the context than the program it extends. Programs that rely on extensions accessing context must themselves access at least the same extent of that context.