sched_ext: Remove redundant css_put() in scx_cgroup_init()
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: 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.
From the CVE record · Linux
An unbalanced css_put() in the error path of scx_cgroup_init() can underflow a cgroup reference count, potentially causing a use-after-free. The input does not specify how an attacker could trigger the error path or whether access or user interaction is required.
Engineers running the Linux kernel should check their exposure; affected versions are not specified.