sched_ext: Disable preemption between scx_claim_exit() and kicking helper work
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Disable preemption between scx_claim_exit() and kicking helper work
scx_claim_exit() atomically sets exit_kind, which prevents scx_error() from triggering further error handling. After claiming exit, the caller must kick the helper kthread work which initiates bypass mode and teardown.
If the calling task gets preempted between claiming exit and kicking the helper work, and the BPF scheduler fails to schedule it back (since error handling is now disabled), the helper work is never queued, bypass mode never activates, tasks stop being dispatched, and the system wedges.
Disable preemption across scx_claim_exit() and the subsequent work kicking in all callers - scx_disable() and scx_vexit(). Add lockdep_assert_preemption_disabled() to scx_claim_exit() to enforce the requirement.
From the CVE record · Linux
In the Linux kernel's sched_ext component, a task can be preempted after claiming an exit but before queuing the helper work needed for teardown. If the BPF scheduler then fails to schedule that task again, tasks stop being dispatched and the system can hang. The input does not specify an attacker, access requirements, or user interaction.
Engineers running Linux kernels with sched_ext should check whether their kernel includes this fix; affected versions are not specified.