CVE-2026-98058·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: bpf: Mark syscall helpers as sleepable bpf_sys_bpf() executes the bpf(2) syscall body, which can take mutexes, allocate with GFP_KERNEL, and wait for an RCU grace period. bpf_sys_close() reaches close_fd() and filp_close(), which can sleep as well. Both helpers are limited to BPF_PROG_TYPE_SYSCALL, whose main program is sleepable. That does not make every callback sleepable: a syscall program can register a bpf_timer callback, and the verifier checks that callback in a non-sleepable context while retaining the syscall helper set. Without .might_sleep on the prototypes, such a callback can invoke bpf_sys_bpf() from hrtimer softirq context and trigger a scheduling-while-atomic failure. bpf_sys_close() is exposed through the same missing context check. Set .might_sleep on both prototypes so the existing helper-context check rejects them from timer callbacks and other atomic regions. Calls from the sleepable main body remain valid.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 7.2.7
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.12% — higher than 2% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 6.19
Until: 7.2.7
Fixed in: 7.2.7
How to fix this CVE
Update your Linux kernel to version 7.2.7 or later to remediate this vulnerability. The kernel's BPF syscall helpers (bpf_sys_bpf and bpf_sys_close) lacked proper sleep-context annotations, allowing them to be invoked from atomic contexts like timer callbacks where sleeping operations would cause kernel panics. Applying this patch ensures the kernel verifier correctly prevents these helpers from being called in non-sleepable contexts.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run 'uname -r' to check your current kernel version; if it is between 6.19 and 7.2.6, your system is vulnerable
- Run 'cat /boot/config-$(uname -r) | grep CONFIG_BPF' to confirm BPF is enabled in your kernel configuration
- Search system logs with 'sudo grep -i "scheduling while atomic\|BPF_PROG_TYPE_SYSCALL" /var/log/kern.log /var/log/syslog' for signs of exploitation attempts
- After patching, run 'uname -r' again and verify the kernel version is 7.2.7 or later
FAQ
What is CVE-2026-98058?
This vulnerability affects the Linux kernel's BPF (Berkeley Packet Filter) subsystem where two syscall helper functions lacked annotations indicating they can sleep, allowing them to be called from atomic contexts like timer interrupts and causing kernel crashes.
Is CVE-2026-98058 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2026-98058?
Kernel versions 6.19 through 7.2.6 are vulnerable; version 7.2.7 and later contain the fix.
How do I check if my server is vulnerable to CVE-2026-98058?
Execute 'uname -r' and compare your kernel version against the affected range (6.19-7.2.6); additionally verify BPF is enabled with 'cat /boot/config-$(uname -r) | grep CONFIG_BPF | grep y'.
Does Defensia detect CVE-2026-98058?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-98058 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/3408e98f06ce06ea6a58ca6c39da9c23f0029c06
- https://git.kernel.org/stable/c/65f636322ac402add6046c68e9ece77b9ffd71c9
- https://git.kernel.org/stable/c/9496d857205e60241034b798d7745ff8830ba599
- https://git.kernel.org/stable/c/d05524794240b52fdc3b6c1220dd05505715824d
- https://git.kernel.org/stable/c/d8cfe9f71d302970ae393616960f2b3021d2b3b0
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-98058. Free for 1 server.
Get started free