Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Disable preemption in __bpf_get_stack

get_perf_callchain() returns a per-CPU perf_callchain_entry buffer and
releases its recursion slot via put_callchain_entry() before returning,
so nothing keeps the entry reserved while __bpf_get_stack() consumes
it below.

A preemptible BPF program (e.g. a non-sleepable raw tracepoint program
on a PREEMPT kernel, which runs under migrate_disable() but not
preempt_disable()) can be scheduled out between obtaining the entry
and the copy. Another task scheduled on the same CPU then reuses the
same per-CPU buffer and overwrites trace->nr with a larger value.
copy_len is then computed from the inflated trace->nr and can exceed
the caller's buffer, causing an out-of-bounds write in the memcpy()
and in the build_id path.

The rcu_read_lock() taken here alone does not prevent this. It is
only taken on the may_fault path, and under CONFIG_PREEMPT_RCU it does
not disable preemption; it merely keeps perf's callchain buffer array
alive (freed via call_rcu()) and does nothing to stop another task
from reusing the entry.

Disable preemption around obtaining the callchain entry and copying
it into the caller's buffer, so the entry cannot be reused underneath
us and trace->nr stays bounded by max_depth. Build ID resolution may
fault and is therefore deferred until after preemption is re-enabled;
by then the instruction pointers have already been copied into buf,
so it operates only on that private copy. Note, preempt_disable() also
subsumes the buffer-lifetime guarantee the rcu_read_lock() provided,
since a preempt-disabled section is an RCU read-side critical section
for the callchain buffers' call_rcu() reclaim.


[ changed Fixes: commit ]
Published: 2026-09-11
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Out-of-bounds write leading to memory corruption
Action: Apply Patch
AI Analysis

Impact

A Linux kernel bug in the BPF subsystem allows a preemptible BPF program to trigger an out-of-bounds write while copying a per-CPU call‑chain buffer. The bug stems from the timer‑independent reuse of a per-CPU buffer between the call to __bpf_get_stack and the subsequent memcpy. If an attacker can run a BPF program that is preemptible, the kernel may allow the buffer to be overwritten, causing trace->nr to grow beyond the caller’s buffer size. The overflow can corrupt memory and potentially lead to privilege escalation or denial of service, depending on the context in which the write occurs. The weakness is a classic out‑of-bounds write (CWE‑787).

Affected Systems

The vulnerability impacts all Linux kernel builds that contain the unpatched BPF implementation. The affected vendor is Linux, product Linux Kernel. No specific version information is supplied; any kernel version prior to the fix that includes the referenced commit is affected.

Risk and Exploitability

The CVSS score of 6.3 indicates a moderate severity. EPSS score of <1%, and the vulnerability is not listed in CISA KEV, implying no publicly documented exploits. Exploitation requires the ability to load a BPFemptible context such as a raw tracepoint or BPF program run under migrate_disable(). The attacker therefore needs local kernel or privileged access to inject BPF code, making remote exploitation unlikely under ordinary circumstances. Nonetheless, compromised nodes could experience memory corruption or a crash.

Generated by OpenCVE AI on September 13, 2026 at 04:46 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Install the latest Linux kernel that incorporates the commit disabling preemption around __bpf_get_stack; vendor security updates that contain this commit should be applied immediately. If your distribution offers rolling kernel updates, apply the fix. For environments where immediate kernel upgrade is not feasible, apply the patch manually to the kernel source by inserting preempt_disable()/preempt_enable() around the call to __bpf_get_stack as described in the patch.
  • If an OS‑level update is not yet available, obtain the corresponding commit from the kernel’s kernel source tree, rebuild, and install the patched kernel to incorporate the preemption disabling fix.
  • For environments where a kernel update cannot be applied immediately, disable or remove BPF programs that rely on raw tracepoints or run in a preemptible context until the kernel is patched, to mitigate the risk of the out‑of-bounds write.

Generated by OpenCVE AI on September 13, 2026 at 04:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 13 Sep 2026 06:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 12 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H'}

threat_severity

Moderate


Fri, 11 Sep 2026 23:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Disable preemption in __bpf_get_stack get_perf_callchain() returns a per-CPU perf_callchain_entry buffer and releases its recursion slot via put_callchain_entry() before returning, so nothing keeps the entry reserved while __bpf_get_stack() consumes it below. A preemptible BPF program (e.g. a non-sleepable raw tracepoint program on a PREEMPT kernel, which runs under migrate_disable() but not preempt_disable()) can be scheduled out between obtaining the entry and the copy. Another task scheduled on the same CPU then reuses the same per-CPU buffer and overwrites trace->nr with a larger value. copy_len is then computed from the inflated trace->nr and can exceed the caller's buffer, causing an out-of-bounds write in the memcpy() and in the build_id path. The rcu_read_lock() taken here alone does not prevent this. It is only taken on the may_fault path, and under CONFIG_PREEMPT_RCU it does not disable preemption; it merely keeps perf's callchain buffer array alive (freed via call_rcu()) and does nothing to stop another task from reusing the entry. Disable preemption around obtaining the callchain entry and copying it into the caller's buffer, so the entry cannot be reused underneath us and trace->nr stays bounded by max_depth. Build ID resolution may fault and is therefore deferred until after preemption is re-enabled; by then the instruction pointers have already been copied into buf, so it operates only on that private copy. Note, preempt_disable() also subsumes the buffer-lifetime guarantee the rcu_read_lock() provided, since a preempt-disabled section is an RCU read-side critical section for the callchain buffers' call_rcu() reclaim. [ changed Fixes: commit ]
Title bpf: Disable preemption in __bpf_get_stack
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-13T06:31:13.931Z

Reserved: 2026-09-11T19:38:34.728Z

Link: CVE-2026-89580

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-11T20:19:42.270

Modified: 2026-09-13T07:17:23.720

Link: CVE-2026-89580

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-11T19:44:46Z

Links: CVE-2026-89580 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-13T05:00:12Z

Weaknesses