HIGH Introduced in 7.1
sched_ext Reenqueue Race
CVE-2026-98864
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: sched_ext: Wait for SCX_OPSS_DISPATCHING before reenqueueing a task ebf1ccff79c4 ("sched_ext: Fix ops.dequeue() semantics") moved the final ops_state store in scx_dispatch_enqueue() after the DSQ unlock so that the custody update and ops.dequeue() precede it. A task can thus be found on a DSQ while still SCX_OPSS_DISPATCHING. The dequeue and core-sched pick paths wait for the state to clear in ops_dequeue() but the reenqueue paths don't. A reenqueue in that window runs ops.enqueue() and sets SCX_OPSS_QUEUED before the dispatch has completed. The dispatcher's final store then overwrites it with SCX_OPSS_NONE and finish_dispatch() drops every later dispatch of the task. Wait for SCX_OPSS_DISPATCHING to clear before dequeueing a task for reenqueue, the same way ops_dequeue() does.
02KernelScan AI Analysis
Risk summary
A race condition in the sched_ext scheduler allows a task reenqueue operation to proceed while a concurrent dispatch is still finalizing, corrupting the task's ops_state. This can cause tasks to become permanently unschedulable (denial of service) or potentially lead to memory corruption exploitable for local privilege escalation. Any local user on a system with sched_ext enabled and a BPF scheduler loaded can trigger the vulnerable path.
Vulnerability analysis
A previous fix moved the final ops_state update in the dispatch path after releasing the DSQ lock, creating a window where a task sits on a dispatch queue while still marked as SCX_OPSS_DISPATCHING. The regular dequeue and core-scheduling paths correctly wait for this state to clear, but the reenqueue paths did not. If a reenqueue occurs during this window, it sets SCX_OPSS_QUEUED, which the dispatcher then overwrites with SCX_OPSS_NONE, causing finish_dispatch() to drop all subsequent dispatches for that task. The fix adds a wait for SCX_OPSS_DISPATCHING to clear in all three reenqueue entry points (local, user, and reject paths), matching the behavior of the existing dequeue paths. The bug is reachable by any local user once a BPF scheduler is loaded via sched_ext, making it relevant for multi-tenant and container environments.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.2 | 7.1 | 7.2.10 | 43457bf65500 |
| mainline | 7.1 | 7.3 | 7de9a6fb44ea |