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 flaw occurs because the container holding the call‑chain entries can be reused between the demand of __bpf_get_stack and the copy. In a PREEMPT kernel, a non‑sleepable raw tracepoint program running under migrate_disable() but not preempt_disable() may be preempted after obtaining the buffer, allowing another task to reuse the same per‑CPU entry and inflate its length field. The copying code then uses this inflated length, causing a memcpy() to overflow the caller’s buffer and corrupt memory in the build_id resolution path. The required preemption guard was missing; the fix introduces preempt_disable() around the buffer acquisition and copy to ensure the entry cannot be reused, bounding trace->nr and preventing the overflow. This vulnerability represents an out‑of‑bounds write (CWE‑787). The affected vendors are Linux kernel maintainers; any kernel build that has not yet merged the commit disabling preemption around __bpf_get_stack is vulnerable. The flaw is local to the kernel; an attacker must be able to load a preemptible BPF program such as a raw tracepoint or other BPF program under migrate_disable() to trigger the overflow. It is therefore not a straightforward remote code execution but can lead to memory corruption, crashes, or privilege escalation if an attacker can raise privileges. The CVE is not listed in CISA KEV, and the EPSS score is <1%, indicating that active exploitation is unlikely. The CVSS score of 7.8 indicates a high severity, and the patch logic specifically disables preemption around the call‑chain buffer processing to eliminate the race between obtaining the entry and copying it.

Affected Systems

The vulnerability impacts all Linux kernel builds that contain the unpatched BPF implementation. The affected vendor 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 7.8 indicates a high severity. EPSS score of <1%, and the vulnerability is not listed in CISA KEV, implying no publicly documented exploits. Exploitation requires 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 15, 2026 at 21:40 UTC.

Remediation

No solution or workaround provided in the CVE record.

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.
  • If an OS‑level update is not yet available, obtain the corresponding commit from the kernel’s source tree, rebuild, and install the patched kernel.
  • Until the kernel is patched, disable or remove all preemptible BPF programs (e.g., raw tracepoints) to prevent exploitation.

Generated by OpenCVE AI on September 15, 2026 at 21:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-6528-1 linux security update
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-15T21:45:17Z

Weaknesses