CVE-2026-139700: bpf: Fix program BTF use-after-free in sleepable programs

Published Nov 30, 2026
·
Updated

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

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:37 PM
Data Sourced
via MITRE·01:37 PM
Description

Frequently Asked Questions

1

Which systems are exposed to this use-after-free condition?

Systems running Linux kernel BPF programs that are sleepable and use object kfunc calls are exposed. The issue involves metadata owned by the program's BTF during program teardown.

2

What timing is required for exploitation or triggering?

A sleepable BPF program must remain active under Tasks Trace RCU after its final reference is dropped. If teardown releases the program BTF through ordinary RCU before that active invocation finishes, bpf_obj_new() can dereference freed metadata.

3

Is the issue limited to deferred program teardown?

The vulnerable lifetime mismatch occurs when program teardown is deferred for an active sleepable program. The described fix also preserves direct cleanup for load errors by invoking the freeing callback synchronously on the non-deferred path.

4

What is the remediation?

Apply a Linux kernel update containing the fix that moves btf_put() into __bpf_prog_put_rcu(). This ensures program BTF is retained until the program's applicable grace period has completed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203