CVE-2026-139305

bpf: Count sleepable callbacks as sleepable map users

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: Count sleepable callbacks as sleepable map users

map->sleepable_refcnt tells bpf_map_fd_put_ptr() whether an inner map that
is taken out of its outer map has to wait for an RCU Tasks Trace grace
period as well. It counts the sleepable programs that use the outer map.
The bpf_wq or bpf_task_work callback of a program that is not sleepable
runs under rcu_read_lock_trace() only, and is not counted.

Such a callback can look an inner map up and keep it while user space
deletes it from the outer map. The inner map is freed behind a plain RCU
grace period, under the callback:

BUG: KASAN: slab-use-after-free in array_map_update_elem+0x6bc/0x7d0

Count a program with such a callback. The maps are bound before the
verifier meets the callback, so raise the count of those that are bound
when it does.

Analysis

AI-generated

Technical impact

The Linux kernel’s BPF subsystem incorrectly counts sleepable callbacks that access inner maps. A non‑sleepable callback can suspend a reference to an inner map while the outer map is freed, causing a use‑after‑free during an RCU grace period. This leads to kernel memory corruption, potential crashes, and possibly arbitrary code execution if an attacker controls the BPF program.

Affected Systems

All Linux kernel versions that include the unpatched BPF map callback logic are affected. No specific kernel release numbers are provided, so any release that contains the vulnerable implementation remains at risk until the fix is applied.

Risk and Exploitability

There is no published CVSS or EPSS score, and the vulnerability is not listed in CISA’s KEV data. The flaw requires local privileged execution to load a malicious BPF program, making it a local high‑severity issue with a high potential impact but uncertain exploitation likelihood. An attacker could trigger the use‑after‑free by deploying a crafted BPF program that accesses inner maps while the outer map is deleted.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a Linux kernel release that includes the BPF map callback fix.
  • Restrict or disable BPF programs that perform inner‑map accesses from outer maps until a patched kernel is deployed.
  • Enable kernel memory debugging tools such as KASAN and monitor logs for use‑after‑free indicators while awaiting an official patch.

Generated by OpenCVE AI on November 30, 2026 at 21:48 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: Count sleepable callbacks as sleepable map users map->sleepable_refcnt tells bpf_map_fd_put_ptr() whether an inner map that is taken out of its outer map has to wait for an RCU Tasks Trace grace period as well. It counts the sleepable programs that use the outer map. The bpf_wq or bpf_task_work callback of a program that is not sleepable runs under rcu_read_lock_trace() only, and is not counted. Such a callback can look an inner map up and keep it while user space deletes it from the outer map. The inner map is freed behind a plain RCU grace period, under the callback: BUG: KASAN: slab-use-after-free in array_map_update_elem+0x6bc/0x7d0 Count a program with such a callback. The maps are bound before the verifier meets the callback, so raise the count of those that are bound when it does.
Title bpf: Count sleepable callbacks as sleepable map users
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:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM