CVE-2026-143194: sched_ext: Reject DSQ iterator kfuncs in tracing programs
In the Linux kernel, the following vulnerability has been resolved:
schedext: Reject DSQ iterator kfuncs in tracing programs
bpfiterscxdsqnext() and bpfiterscxdsqdestroy() take the target user DSQ's raw spinlock, but they are in scxkfuncidsany, which is also registered for BPFPROGTYPETRACING.
For an active root scheduler without ops.subattach, the compatibility path in scxprogsched() lets an unassociated tracing program resolve to that scheduler. The tracing program can then call the iterator kfuncs while the target DSQ lock is already held.
For example, a scheduler which mixes FIFO and priority-queue insertions into a user DSQ triggers scxerror() from scxdispatchenqueue() while holding that DSQ's lock. scxclaimexit() emits schedextexit before the lock is released:
scxdispatchenqueue() rawspinlock(&dsq->lock) scxerror() scxclaimexit() traceschedextexit() tracing BPF program bpfiterscxdsqnew(dsqid) bpfforeach(scxdsq, p, dsqid, 0) bpfiterscxdsqnext(it) rawspinlockirqsave(&dsq->lock)
The tracing program recursively acquires the same raw spinlock and locks up the CPU. Because the tracepoint runs before scxfinishexit(), disableirqwork is not queued and the scheduler cannot enter its normal disable path.
Reject the two iterator kfuncs from tracing programs at verification time. The kfuncs remain available to SCX structops and syscall programs. bpfiterscxdsqdestroy() has no independent live reproduction: its cursor only links into the DSQ after at least one successful next(), which deadlocks in the same window first. It is included for symmetry.
This extends the coverage of commit b07a7450f6ef ("schedext: Reject rq-lock-taking kfuncs in tracing programs") and commit 4c2e0751d5e6 ("schedext: Reject scxbpfdestroydsq() in tracing programs").
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Exposure requires an active root sched_ext scheduler without ops.sub_attach and a tracing BPF program that can resolve to that scheduler through the compatibility path. The triggering scenario also requires a user DSQ whose lock is held when the relevant sched_ext tracepoint executes.
What must the tracing BPF program do to trigger the failure?
It must invoke the DSQ iterator path, including bpf_iter_scx_dsq_next() or bpf_iter_scx_dsq_destroy(), against the target user DSQ while that DSQ's raw spinlock is already held. This results in recursive acquisition of the same raw spinlock.
What is the expected impact if exploitation succeeds?
The recursive raw-spinlock acquisition locks up the CPU. The described path occurs while handling sched_ext exit processing, before the DSQ lock is released.
How is the issue addressed by the resolved change?
The fix rejects DSQ iterator kfuncs in tracing programs, preventing tracing programs from using the affected iterator functions through the incompatible program type.