AZL-117292: CVE-2026-139700 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix program BTF use-after-free in sleepable programs
Object kfunc calls embed metadata owned by the program BTF. A sleepable program can remain active under Tasks Trace RCU after its last reference is dropped, while program teardown releases the BTF through ordinary RCU. The invocation can then dereference freed metadata in bpfobjnew().
Move btfput() into bpfprogputrcu(), the callback that frees the program. When teardown is deferred, that callback runs after the program's own grace period (Tasks Trace RCU for sleepable programs and ordinary RCU otherwise), so the BTF outlives every active invocation. The non-deferred path invokes the callback synchronously, so load-error cleanup stays direct.
Affected Software
Event History
Frequently Asked Questions
What conditions are required for the use-after-free to occur?
The issue involves sleepable BPF programs that make object kfunc calls, because those calls use metadata owned by the program's BTF. It can occur when the program's last reference is dropped while an invocation remains active under Tasks Trace RCU.
What is the impact window during program teardown?
A still-active sleepable program invocation can dereference BTF metadata after ordinary RCU teardown has released it. The affected dereference is described as occurring in bpf_obj_new().
How does the resolution prevent the issue?
The fix moves BTF release into __bpf_prog_put_rcu(), which frees the program after the applicable grace period. For sleepable programs, this ensures BTF remains available until Tasks Trace RCU confirms active invocations have completed.