CVE-2026-139295

bpf: Keep the symbols of a program until it has ended

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: Keep the symbols of a program until it has ended

When the last reference to a program goes, __bpf_prog_put_noref() takes
its symbols out of the kallsyms tree and frees its line info at once, and
waits for the grace periods only with the rest. But the program may still
be running: the link or the array it was called from is gone, the call is
not over.

search_bpf_extables() finds the exception table of a program by its
symbol. A load that faults, and that the table is there to fix up, is
fatal from then on:

Oops: general protection fault, probably for non-canonical address
0xdead0000000006f8: 0000 [#1] SMP NOPTI
RIP: 0010:0xffffffffc06008f6

It takes a program that is detached and closed on one CPU while it runs on
another. Unwinders and bpf_prog_find_from_stack() do not know the program
any more either, and the stack dump of a BPF stream reads the freed line
info.

Free the line info behind the grace periods the program needs, as it is
done with the BTF that its text comes from. Remove the symbols in
bpf_prog_free_deferred(), which runs behind them as well. The symbols are
looked up under rcu_read_lock(), so the images and the program itself are
freed one more grace period later. All that the program refers to is
released when it was before.

Analysis

AI-generated

Technical impact

The vulnerability allows a BPF program in the Linux kernel to be prematurely removed from the symbol table and its line information freed while the program is still executing. This causes a general protection fault and results in a kernel oops, rendering the system unstable or crashing. The impact is a denial‑of‑service that can be triggered by misbehaving or malicious BPF programs.

Affected Systems

All versions of the Linux kernel that have not incorporated the fix are affected. The bug manifests in any kernel that supports BPF programs and performs the premature cleanup described in the patch notes.

Risk and Exploitability

The flaw is not listed in the CISA KEV catalog and EPSS data is currently unavailable, but the described behavior indicates a high‑severity condition. An attacker with the ability to load or control BPF programs can trigger the erroneous cleanup, leading to a kernel crash. The likely attack vector is a local user or process that loads a BPF program and then detaches it while it remains active. Without the fix, the risk is high for system availability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to the latest patched version that resolves the premature symbol removal issue.
  • If an immediate kernel upgrade is not possible, avoid detaching BPF programs while they are still active; maintain proper reference counting or keep the program reference until it has finished execution.
  • Limit the use of BPF programs to trusted code paths and restrict capabilities required to load or detach BPF programs to the minimum necessary.
  • Monitor kernel logs for general protection faults or oops messages and alert on their occurrence.

Generated by OpenCVE AI on November 30, 2026 at 21:04 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: Keep the symbols of a program until it has ended When the last reference to a program goes, __bpf_prog_put_noref() takes its symbols out of the kallsyms tree and frees its line info at once, and waits for the grace periods only with the rest. But the program may still be running: the link or the array it was called from is gone, the call is not over. search_bpf_extables() finds the exception table of a program by its symbol. A load that faults, and that the table is there to fix up, is fatal from then on: Oops: general protection fault, probably for non-canonical address 0xdead0000000006f8: 0000 [#1] SMP NOPTI RIP: 0010:0xffffffffc06008f6 It takes a program that is detached and closed on one CPU while it runs on another. Unwinders and bpf_prog_find_from_stack() do not know the program any more either, and the stack dump of a BPF stream reads the freed line info. Free the line info behind the grace periods the program needs, as it is done with the BTF that its text comes from. Remove the symbols in bpf_prog_free_deferred(), which runs behind them as well. The symbols are looked up under rcu_read_lock(), so the images and the program itself are freed one more grace period later. All that the program refers to is released when it was before.
Title bpf: Keep the symbols of a program until it has ended
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