CVE-2026-139700

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

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
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 bpf_obj_new().

Move btf_put() into __bpf_prog_put_rcu(), 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.

Analysis

AI-generated

Technical impact

The vulnerability arises from a use‑after‑free in the handling of BPF program BTF data for sleepable programs. When the program’s last reference is released, its BTF metadata can be freed while an invocation is still active, causing the kernel to dereference freed memory during bpf_obj_new(). If successfully triggered, this could corrupt kernel data structures or enable execution of arbitrary code with kernel privilege.

Affected Systems

The flaw affects Linux kernels deployed on the Linux:Linux platform. While the specific kernel versions that contain the vulnerability are not enumerated in the data, all kernels before the patch that introduces the btf_put() change in __bpf_prog_put_rcu() are considered at risk.

Risk and Exploitability

No EPSS score is supplied, and the vulnerability is not listed in CISA KEV. The CVSS score is not provided, so the exact severity cannot be quantified here. The likely attack vector requires execution of a BPF program in a sleepable context, implying a local or privilege‑escalation scenario. The use‑after‑free presents a high potential impact if an attacker can trigger the fault while the kernel is running normally.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that contains the commit series where btf_put() is moved into __bpf_prog_put_rcu()
  • If an upgrade cannot be performed immediately, consider disabling BPF program loading or limiting BPF use to non‑sleepable contexts until the patch is applied
  • Continuously monitor kernel logs and crash reports for signs of kernel memory corruption or unexpected BPF activity

Generated by OpenCVE AI on December 1, 2026 at 01:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description 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 bpf_obj_new(). Move btf_put() into __bpf_prog_put_rcu(), 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.
Title bpf: Fix program BTF use-after-free in sleepable programs
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:37 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM