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-98046 Overview
CVE-2026-98046 is a Linux kernel vulnerability in the Berkeley Packet Filter (BPF) subsystem. The bpf_btf_find_by_name_kind() helper returns a BPF Type Format (BTF) object file descriptor through __btf_new_fd(). That path reaches anon_inode_getfd(), which can sleep while allocating or expanding the current task's file descriptor table.
The helper prototype did not set might_sleep, so the verifier permitted calls from non-sleepable contexts such as BPF timer callbacks. The file descriptor allocation could then sleep in softirq context and install the descriptor into the interrupted task.
Critical Impact
Calling a sleeping function from softirq context can trigger kernel scheduling violations and leak file descriptors into unrelated tasks, corrupting process state.
Affected Products
- Linux kernel versions containing the bpf_btf_find_by_name_kind() helper without the sleepable annotation
- Stable branches referenced by the upstream fix commits
- Systems permitting unprivileged or privileged BPF program loading with timer callbacks
Discovery Timeline
- 2026-09-25 - CVE-2026-98046 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-98046
Vulnerability Analysis
The flaw sits in the Linux kernel BPF verifier's handling of helper function sleep semantics. When a BPF program invokes bpf_btf_find_by_name_kind() and the lookup resolves to a type in a module BTF, the helper returns a new BTF object file descriptor through __btf_new_fd(). That code path calls anon_inode_getfd(), which internally performs file descriptor table expansion that may block.
Because the helper prototype omitted the might_sleep flag, the verifier allowed the helper in non-sleepable program types. This includes BPF timer callbacks, which execute in softirq context where blocking is prohibited.
Root Cause
The root cause is a mismatch between the helper's declared verifier contract and its runtime behavior. The helper reaches sleeping code through the anonymous inode and file descriptor allocation path, but the prototype did not advertise this through might_sleep. The verifier therefore treated it as safe for atomic contexts.
Attack Vector
A local user loading a permitted BPF program that attaches to a timer or other non-sleepable hook can invoke bpf_btf_find_by_name_kind(). When the helper triggers file descriptor table expansion in softirq context, the kernel may schedule or sleep where it must not. The resulting descriptor is installed into whichever task the softirq interrupted, producing cross-task file descriptor leakage and potential kernel instability.
No verified exploit code is public. See the upstream commits for the exact code paths: Kernel Git Commit 17f54a8, Kernel Git Commit 29e4017, Kernel Git Commit 4d87842, and Kernel Git Commit 620614b.
Detection Methods for CVE-2026-98046
Indicators of Compromise
- Kernel warnings or BUG: sleeping function called from invalid context traces referencing anon_inode_getfd or __btf_new_fd originating from softirq.
- Unexpected open file descriptors in processes that did not open them, pointing to anon_inode:[btf].
- Scheduler or RCU stall messages correlating with BPF timer callback execution.
Detection Strategies
- Audit loaded BPF programs on production hosts using bpftool prog show and inspect timer callback programs that call BTF lookup helpers.
- Enable CONFIG_DEBUG_ATOMIC_SLEEP in test environments to surface sleep-in-atomic violations before deployment.
- Correlate kernel ring buffer warnings with BPF program load events in centralized logs.
Monitoring Recommendations
- Forward dmesg and /var/log/kern.log to a centralized data lake and alert on might_sleep and invalid context strings.
- Track bpf() syscall usage per user and flag unprivileged BPF loads that attach timer callbacks.
- Monitor file descriptor table growth in long-running system daemons to detect anomalous installations.
How to Mitigate CVE-2026-98046
Immediate Actions Required
- Apply the stable kernel updates containing the four referenced upstream commits.
- Restrict BPF program loading to privileged users by setting kernel.unprivileged_bpf_disabled=1.
- Inventory custom BPF programs and identify any using bpf_btf_find_by_name_kind() from timer or other non-sleepable hooks.
Patch Information
The upstream fix marks bpf_btf_find_by_name_kind() as sleepable. This preserves calls from the main body of sleepable syscall programs while causing the verifier to reject calls from non-sleepable regions. Apply the fixes referenced in Kernel Git Commit 17f54a8, Kernel Git Commit 29e4017, Kernel Git Commit 4d87842, and Kernel Git Commit 620614b.
Workarounds
- Disable unprivileged BPF via sysctl -w kernel.unprivileged_bpf_disabled=1 until the patched kernel is deployed.
- Avoid loading BPF timer-callback programs that reference BTF lookup helpers on unpatched hosts.
- Use Linux Security Modules such as SELinux or AppArmor to constrain which processes can invoke the bpf() syscall.
# Configuration example
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' >> /etc/sysctl.d/99-bpf-hardening.conf
bpftool prog show
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

