Not scored
sched_ext: Take cgroup_lock() first in scx_cgroup_lock()
- Severity
- Not scored
- Exploit likelihood
- 0.17% (higher than 6% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: sched_ext: Take cgroup_lock() first in scx_cgroup_lock() scx_cgroup_lock() write-locks scx_cgroup_ops_rwsem and then takes cgroup_lock(), which can deadlock through kernfs: scx enable/disable cgroup rmdir cpu.weight write ------------------ ------------ ---------------- cgroup_lock() percpu_down_write(rwsem) cgroup_lock() kernfs_get_active() percpu_down_read(rwsem) kernfs_drain() The enable path waits for the rmdir to release cgroup_mutex. The rmdir, deactivating the cpu controller's files, waits in kernfs_drain() for the write's active reference. The write, in scx_group_set_weight(), waits for the rwsem behind the pending writer. Take cgroup_lock() first. The set_* paths take no cgroup locks inside the read side, so a pending write-lock then only waits for read sections that always run to completion, and no dependency from the rwsem back to cgroup_mutex remains.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from a5bd6ba30b3364354269b81ac55c2edca9a96d6d before 2ca6b43edf83f8fc368cc3094ee5f3b1e8e0b0f0, from a5bd6ba30b3364354269b81ac55c2edca9a96d6d before a054c9ffa9b7a0dffb763837b91ac9d381ec6d10, from a5bd6ba30b3364354269b81ac55c2edca9a96d6d before 5f8b69642d18e1f3e11996707842ac530444e959, 6.18 Not affected: before 6.18, from 6.18.46 up to 6.18.*, from 7.1.9 up to 7.1.*, from 7.2 up to * | CVE List |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: sched_ext: Take cgroup_lock() first in scx_cgroup_lock() scx_cgroup_lock() write-locks scx_cgroup_ops_rwsem and then takes cgroup_lock(), which can deadlock through kernfs: scx enable/disable cgroup rmdir cpu.weight write ------------------ ------------ ---------------- cgroup_lock() percpu_down_write(rwsem) cgroup_lock() kernfs_get_active() percpu_down_read(rwsem) kernfs_drain() The enable path waits for the rmdir to release cgroup_mutex. The rmdir, deactivating the cpu controller's files, waits in kernfs_drain() for the write's active reference. The write, in scx_group_set_weight(), waits for the rwsem behind the pending writer. Take cgroup_lock() first. The set_* paths take no cgroup locks inside the read side, so a pending write-lock then only waits for read sections that always run to completion, and no dependency from the rwsem back to cgroup_mutex remains.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: sched_ext: Tomar cgroup_lock() primero en scx_cgroup_lock() scx_cgroup_lock() bloquea en modo escritura scx_cgroup_ops_rwsem y luego toma cgroup_lock(), lo que puede causar un interbloqueo a través de kernfs: scx habilitar/deshabilitar cgroup rmdir cpu.weight escritura ------------------------- ------------ ------------------- cgroup_lock() percpu_down_write(rwsem) cgroup_lock() kernfs_get_active() percpu_down_read(rwsem) kernfs_drain() La ruta de habilitación espera a que el rmdir libere cgroup_mutex. El rmdir, al desactivar los archivos del controlador de CPU, espera en kernfs_drain() la referencia activa de la escritura. La escritura, en scx_group_set_weight(), espera al rwsem detrás del escritor pendiente. Tomar cgroup_lock() primero. Las rutas set_* no toman bloqueos de cgroup dentro del lado de lectura, por lo que un bloqueo de escritura pendiente entonces solo espera por secciones de lectura que siempre se ejecutan hasta su finalización, y no queda ninguna dependencia del rwsem de vuelta a cgroup_mutex.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-74593 changed 2026-08-23 | CVE Terms of Use |
| NVD | CVE-2026-74593 changed 2026-10-14 | Public domain |