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-98865 Overview
CVE-2026-98865 is a Linux kernel vulnerability in the sched_ext BPF-extensible scheduler subsystem. The flaw resides in the ops.dequeue() callback invocation path, where the kernel calls the operation while still holding a user Dispatch Queue (DSQ) lock. A BPF scheduler that attempts to lock the source user DSQ from within ops.dequeue(), such as by iterating the queue with bpf_iter_scx_dsq, self-deadlocks. Because all DSQ locks share a single lockdep class, iterating any user DSQ from ops.dequeue() on the consume and move paths triggers the lockdep recursion check. The issue impacts kernels shipping sched_ext with BPF scheduler support.
Critical Impact
A malicious or buggy BPF scheduler can deadlock the kernel scheduler, resulting in a local denial-of-service condition on affected Linux systems.
Affected Products
- Linux kernel versions containing the sched_ext subsystem
- Systems using BPF schedulers that iterate user DSQs from ops.dequeue()
- Distributions shipping affected mainline kernel builds
Discovery Timeline
- 2026-10-18 - CVE-2026-98865 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98865
Vulnerability Analysis
The sched_ext (SCX) subsystem allows loading custom CPU schedulers written in BPF. Schedulers interact with dispatch queues through callback operations such as ops.enqueue(), ops.dispatch(), and ops.dequeue(). The kernel invokes ops.dequeue() from two internal paths: scx_consume_dispatch_q() and move_task_between_dsqs(). On both paths, the source user DSQ's lock is still held when the callback runs.
If a BPF scheduler calls a kfunc that attempts to acquire the same DSQ lock, for example by iterating the queue with bpf_iter_scx_dsq, the thread deadlocks against itself. Even when a different user DSQ is iterated, the shared lockdep class across all DSQ locks causes the recursion check to fire. Builtin DSQs are not affected on the global and bypass paths because ops.dequeue() restricts callers to "any" kfuncs that cannot lock a builtin DSQ.
Root Cause
The root cause is improper lock scope management [CWE-667]. The scheduler callback executes with a DSQ spinlock held, violating the invariant that BPF callbacks be invoked in a context where any permitted kfunc can safely acquire scheduler locks.
Attack Vector
Exploitation requires the ability to load a BPF scheduler, which typically needs CAP_SYS_ADMIN or equivalent privileges. A privileged local actor loading a crafted or buggy BPF scheduler that calls bpf_iter_scx_dsq from ops.dequeue() can trigger the deadlock, hanging the task and potentially the scheduler.
No verified public exploit code is available. The vulnerability mechanism is described in the upstream commit messages referenced below. See the Linux Kernel Commit cb86607 and Linux Kernel Commit fe499ae9 for the authoritative patches.
Detection Methods for CVE-2026-98865
Indicators of Compromise
- Kernel log entries showing lockdep recursion warnings referencing DSQ locks or scx_consume_dispatch_q
- Soft lockup or hung task warnings associated with the sched_ext subsystem
- Unexpected scheduler stalls on systems running custom BPF schedulers
Detection Strategies
- Audit loaded BPF programs for schedulers that call bpf_iter_scx_dsq from within ops.dequeue()
- Monitor dmesg for lockdep splats containing sched_ext, scx_dsq, or move_task_between_dsqs
- Correlate kernel panics and task hangs with recent BPF scheduler load events via bpftool prog list
Monitoring Recommendations
- Centralize kernel logs and alert on lockdep recursion warnings
- Track usage of bpf() syscalls and SCX scheduler load events on production hosts
- Baseline scheduler behavior and alert on anomalous task state transitions
How to Mitigate CVE-2026-98865
Immediate Actions Required
- Apply the upstream Linux kernel patches referenced in commits cb86607a and fe499ae9
- Restrict CAP_SYS_ADMIN and CAP_BPF so that only trusted operators can load BPF schedulers
- Audit in-house and third-party BPF schedulers for calls to bpf_iter_scx_dsq inside ops.dequeue()
Patch Information
The fix moves the ops.dequeue() invocation after the DSQ unlock on all three affected paths. The SCX_TASK_IN_CUSTODY flag is cleared under the lock that serializes the transfer, ensuring the callback is invoked exactly once. Patches are available in the mainline tree via Linux Kernel Commit cb86607 and Linux Kernel Commit fe499ae9. Rebuild and deploy updated kernel packages from your distribution once backports become available.
Workarounds
- Disable or unload custom sched_ext BPF schedulers until patched kernels are deployed
- Build kernels without CONFIG_SCHED_CLASS_EXT on systems that do not require BPF scheduling
- Enforce code review requirements prohibiting DSQ iteration from within ops.dequeue() callbacks
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

