CVE-2026-143323: sched_ext: Reject scx_bpf_destroy_dsq() in tracing programs
In the Linux kernel, the following vulnerability has been resolved:
schedext: Reject scxbpfdestroydsq() in tracing programs
scxbpfdestroydsq() takes the target user DSQ's raw spinlock. However, it is 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 scxbpfdestroydsq() 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 scxbpfdestroydsq(dsqid) destroydsq() 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 scxbpfdestroydsq() from tracing programs at verification time. The kfunc remains available to SCX structops and syscall programs.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Prevent BPF_PROG_TYPE_TRACING programs from calling scx_bpf_destroy_dsq() by rejecting the call at verification time; keep the kfunc available to SCX struct_ops and syscall programs.
Event History
Frequently Asked Questions
Which systems are exposed to this lockup condition?
Exposure requires an active sched_ext root scheduler without ops.sub_attach and a tracing BPF program that can resolve to that scheduler through the compatibility path. The issue specifically involves user DSQs and the scx_bpf_destroy_dsq() kfunc.
What triggers the CPU lockup?
A tracing BPF program calls scx_bpf_destroy_dsq() while the target user DSQ's raw spinlock is already held. The destroy operation attempts to acquire the same raw spinlock recursively, locking up the CPU before the scheduler can follow its normal disable path.
What can be done before the fix is deployed?
Do not allow tracing BPF programs to call scx_bpf_destroy_dsq() in affected sched_ext deployments. Avoid the combination of an active root scheduler without ops.sub_attach and tracing programs that can use this kfunc.