Linux
sched_ext: Read scx_root under scx_cgroup_ops_rwsem in cgroup setters
In the Linux kernel, the following vulnerability has been resolved: sched_ext: Read scx_root under scx_cgroup_ops_rwsem in cgroup setters scx_group_set_{weight,idle,bandwidth}() cache scx_root before acquiring scx_cgroup_ops_rwsem, so the pointer can be stale by the time the op runs. If the loaded scheduler is disabled and freed (via RCU work) and another is enabled between the naked load and the rwsem acquire, the reader sees scx_cgroup_enabled=true (the new scheduler's) but dereferences the freed one - UAF on SCX_HAS_OP(sch, ...) / SCX_CALL_OP(sch, ...). scx_cgroup_enabled is toggled only under scx_cgroup_ops_rwsem write (scx_cgroup_{init,exit}), so reading scx_root inside the rwsem read section correlates @sch with the enabled snapshot.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= a5bd6ba30b3364354269b81ac55c2edca9a96d6d, < ce9aaa3af445c391735c9d000c4db60dfd5640d4
- >= a5bd6ba30b3364354269b81ac55c2edca9a96d6d, < 0f54f6355575971673d8aac7da107ec4178e45bd
- >= a5bd6ba30b3364354269b81ac55c2edca9a96d6d, < 80afd4c84bc8f5e80145ce35279f5ce53f6043db
Fixed in ce9aaa3af445c391735c9d000c4db60dfd5640d4, 0f54f6355575971673d8aac7da107ec4178e45bd, 80afd4c84bc8f5e80145ce35279f5ce53f6043db
- 6.18
Fixed in 0, 6.18.32, 7.0.7, 7.1
Mitigation
Upgrade Linux to ce9aaa3af445c391735c9d000c4db60dfd5640d4 or 0f54f6355575971673d8aac7da107ec4178e45bd or 80afd4c84bc8f5e80145ce35279f5ce53f6043db or later.
Upgrade Linux to 0 or 6.18.32 or 7.0.7 or 7.1 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.