HIGH
sched_ext CgroupInit UAF
CVE-2026-43438
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.7MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: sched_ext: Remove redundant css_put() in scx_cgroup_init() The iterator css_for_each_descendant_pre() walks the cgroup hierarchy under cgroup_lock(). It does not increment the reference counts on yielded css structs. According to the cgroup documentation, css_put() should only be used to release a reference obtained via css_get() or css_tryget_online(). Since the iterator does not use either of these to acquire a reference, calling css_put() in the error path of scx_cgroup_init() causes a refcount underflow. Remove the unbalanced css_put() to prevent a potential Use-After-Free (UAF) vulnerability.
02KernelScan AI Analysis
Risk summary
A reference counting error in sched_ext cgroup initialization can cause use-after-free conditions when scheduler loading fails. This affects systems where root users load custom BPF schedulers with cgroup support, potentially leading to kernel memory corruption or crashes.
Vulnerability analysis
The vulnerability occurs in scx_cgroup_init() where css_for_each_descendant_pre() iterator walks cgroup hierarchy without incrementing reference counts, but the error path incorrectly calls css_put() causing reference underflow. This can free CSS structs prematurely, creating use-after-free conditions. The fix removes the unbalanced css_put() call. Attack surface is limited to privileged users who can load sched_ext BPF schedulers, typically requiring CAP_SYS_ADMIN.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.78 | cc095cd305fd |
| 6.18 | 6.18.19 | 6eaaa67d6998 |
| 6.19 | 6.19.9 | bf50f3285eda |
| mainline | 7.0 | 1336b579f607 |