Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98045 Overview
CVE-2026-98045 affects the Linux kernel BPF (Berkeley Packet Filter) subsystem. The vulnerability involves the faultable variants of bpf_get_stack() and bpf_get_task_stack() helpers, which pass may_fault=true into the common stack collection code. When resolving user-space build IDs, these helpers can call build_id_parse_file() and block on filesystem reads.
Neither helper prototype sets might_sleep. The verifier can allow these helpers from a non-sleepable region within a sleepable program, including RCU or preemption-disabled regions. The task-stack helper can also run from a non-sleepable timer callback of a sleepable program, creating conditions for sleeping while atomic.
Critical Impact
BPF programs invoking faultable stack helpers from non-sleepable contexts can block on filesystem I/O, triggering sleeping-in-atomic-context kernel faults.
Affected Products
- Linux Kernel (upstream, versions containing faultable bpf_get_stack() and bpf_get_task_stack() helpers)
- Linux stable kernel branches referenced by the fix commits
- Distributions shipping affected kernel versions prior to backported patches
Discovery Timeline
- 2026-09-25 - CVE-2026-98045 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-98045
Vulnerability Analysis
The Linux kernel exposes two BPF helpers for stack collection: bpf_get_stack() and bpf_get_task_stack(). Faultable variants of these helpers pass may_fault=true into shared stack collection logic. When BPF programs request user-space build ID resolution, the code path reaches build_id_parse_file(), which can block waiting on filesystem reads.
The BPF verifier selects helper prototypes based on the sleepability of the entire program. However, neither faultable prototype was marked with might_sleep. As a result, the verifier permits these helpers in non-sleepable regions nested within a sleepable program, such as code protected by explicit RCU read-side critical sections or preemption-disabled scopes. The task-stack helper is also reachable from non-sleepable timer callbacks within a sleepable program.
Root Cause
The root cause is missing sleepability metadata on the faultable BPF helper prototypes. Because the verifier's prototype selection relies on program-wide sleepability rather than contextual sleepability, non-sleepable code paths inside sleepable programs can call helpers that may block. The fix marks both faultable prototypes as sleepable so the existing helper context check rejects calls from atomic regions while still permitting them in genuinely sleepable contexts.
Attack Vector
Exploitation requires the ability to load BPF programs, which generally requires CAP_BPF or CAP_SYS_ADMIN. A privileged or compromised local actor can craft a sleepable BPF program that invokes bpf_get_stack() or bpf_get_task_stack() with build ID resolution enabled from an RCU-protected, preemption-disabled, or timer-callback region. Blocking on filesystem I/O inside atomic context can trigger kernel warnings, scheduler misbehavior, or denial-of-service conditions on affected hosts.
See the upstream fix commits for technical details: Linux Kernel Commit 19e8d5a, Linux Kernel Commit 3014e8a, Linux Kernel Commit 44b8d37, and Linux Kernel Commit 9d02927.
Detection Methods for CVE-2026-98045
Indicators of Compromise
- Kernel log entries containing BUG: sleeping function called from invalid context referencing BPF stack helper call sites.
- Warnings from might_sleep checks or __might_fault originating in build_id_parse_file() during BPF program execution.
- Unexpected soft lockups or scheduler warnings coinciding with BPF program loads that use build ID resolution.
Detection Strategies
- Audit loaded BPF programs for use of bpf_get_stack() or bpf_get_task_stack() with the BPF_F_USER_BUILD_ID flag using bpftool prog show and bpftool prog dump.
- Review kernel versions against the stable commits referenced above to determine whether the fix is applied.
- Monitor dmesg and journald for faultable helper warnings tied to RCU or atomic context violations.
Monitoring Recommendations
- Enable kernel lockdep and CONFIG_DEBUG_ATOMIC_SLEEP in test environments to surface sleep-in-atomic violations early.
- Collect and centralize kernel ring buffer events to detect repeated BPF-related warnings across the fleet.
- Track BPF program load events via audit subsystem rules on the bpf() syscall to identify who is deploying stack-collection programs.
How to Mitigate CVE-2026-98045
Immediate Actions Required
- Apply the upstream kernel patches referenced in the fix commits as soon as vendor builds are available.
- Restrict CAP_BPF and CAP_SYS_ADMIN to a minimal set of trusted service accounts to reduce the attack surface for BPF program loading.
- Inventory custom BPF tooling that relies on faultable stack helpers with build ID resolution and validate behavior after patching.
Patch Information
The fix marks both faultable helper prototypes as sleepable so the verifier's helper context check rejects calls from non-sleepable regions. Patches are available in the upstream Linux stable tree. See Linux Kernel Commit 19e8d5a, Linux Kernel Commit 3014e8a, Linux Kernel Commit 44b8d37, and Linux Kernel Commit 9d02927. Coordinate with your distribution vendor to obtain the appropriate backports.
Workarounds
- Disable or restrict unprivileged BPF via the kernel.unprivileged_bpf_disabled sysctl where operationally feasible.
- Avoid loading sleepable BPF programs that invoke faultable stack helpers with build ID resolution until the patched kernel is deployed.
- Enforce LSM or seccomp policies that limit which workloads can call the bpf() syscall.
# Configuration example: restrict unprivileged BPF program loading
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' | tee -a /etc/sysctl.d/99-bpf-hardening.conf
# Verify current running kernel against patched version
uname -r
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

