AZL-117022: CVE-2026-139297 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: Don't let an extension reach further into the context than its target
How large the context of a raw tracepoint, tracepoint or syscall program is depends on what the program is attached to, or is run with. bpfproberegister(), perfeventsetbpfprog() and the test runs compare that with maxctxoffset of the program.
An extension of the program, or of one of its global functions, gets the same context. How far it reaches is noted in its own maxctxoffset, which nobody looks at. On a tracepoint with one argument it reads the stack behind the arguments, in a test run the memory behind the context, or from NULL if there is none:
BUG: KASAN: stack-out-of-bounds in bpfprog954b5d2051843629ts28extfar+0x7e/0x113 Read of size 8 at addr ffffc90000def7b8 by task ts28/104
BUG: KASAN: slab-out-of-bounds in bpfprog954b5d2051843629ts28extfar+0x7e/0x113 Read of size 8 at addr ffff88810712c3e8 by task ts28/104
Refuse to attach an extension that reaches further than the program which it extends. A program that leaves the context to its extensions has to touch as much of it as they do.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the out-of-bounds access?
An attacker needs to attach a BPF extension whose context access reaches farther than the target program's recorded maximum context offset. The affected paths include raw tracepoints, tracepoints, syscalls, perf-event BPF attachment, and BPF test runs.
What could indicate that this issue has already been triggered?
Kernel diagnostics may report KASAN stack-out-of-bounds or slab-out-of-bounds reads originating from an extended BPF program. In a BPF test run with no context, the extension can read from NULL.
What is the mitigation if an updated kernel cannot be deployed immediately?
Prevent attachment or execution of BPF extensions that access more context than their target program, and ensure target programs touch at least as much context as their extensions. Restricting the ability to load and attach such BPF programs reduces exposure.