CVE-2024-43853: cgroup/cpuset: Prevent UAF in proc_cpuset_show()
In the Linux kernel, the following vulnerability has been resolved:
cgroup/cpuset: Prevent UAF in proc_cpuset_show()
An UAF can happen when /proc/cpuset is read as reported in [1].
This can be reproduced by the following methods:
1.add an mdelay(1000) before acquiring the cgroup_lock In the
cgroup_path_ns function.
2.$cat /proc/<pid>/cpuset repeatly.
3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/
$umount /sys/fs/cgroup/cpuset/ repeatly.
The race that cause this bug can be shown as below:
(umount) | (cat /proc/<pid>/cpuset)
css_release | proc_cpuset_show
css_release_work_fn | css = task_get_css(tsk, cpuset_cgrp_id);
css_free_rwork_fn | cgroup_path_ns(css->cgroup, ...);
cgroup_destroy_root | mutex_lock(&cgroup_mutex);
rebind_subsystems |
cgroup_free_root |
| // cgrp was freed, UAF
| cgroup_path_ns_locked(cgrp,..);
When the cpuset is initialized, the root node top_cpuset.css.cgrp
will point to &cgrp_dfl_root.cgrp. In cgroup v1, the mount operation will
allocate cgroup_root, and top_cpuset.css.cgrp will point to the allocated
&cgroup_root.cgrp. When the umount operation is executed,
top_cpuset.css.cgrp will be rebound to &cgrp_dfl_root.cgrp.
The problem is that when rebinding to cgrp_dfl_root, there are cases
where the cgroup_root allocated by setting up the root for cgroup v1
is cached. This could lead to a Use-After-Free (UAF) if it is
subsequently freed. The descendant cgroups of cgroup v1 can only be
freed after the css is released. However, the css of the root will never
be released, yet the cgroup_root should be freed when it is unmounted.
This means that obtaining a reference to the css of the root does
not guarantee that css.cgrp->root will not be freed.
Fix this problem by using rcu_read_lock in proc_cpuset_show().
As cgroup_root is kfree_rcu after commit d23b5c577715
("cgroup: Make operations on the cgroup root_list RCU safe"),
css->cgroup won't be freed during the critical section.
To call cgroup_path_ns_locked, css_set_lock is needed, so it is safe to
replace task_get_css with task_css.
[1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd
Security readout for executives and security teams
Plain-English summary
A race in the Linux cpuset subsystem can access kernel memory after it has been freed. Triggering requires local access and precise timing, but successful abuse could affect confidentiality, integrity, or availability. This is not described as a remotely exploitable flaw.
Executive priority
Treat this as a high-priority kernel update, especially on multi-user systems or hosts running untrusted local workloads. It does not warrant internet-exposure emergency handling based on current evidence, but kernel memory-safety defects can have serious consequences. Accelerate remediation where cgroup v1 cpuset is actively used.
Technical view
While proc_cpuset_show() reads a task's cpuset path, concurrent unmounting and rebinding of a cgroup v1 cpuset root can free a cached cgroup_root, causing a use-after-free. The kernel fix protects the read with RCU so the referenced cgroup is not freed during the critical section.
Likely exposure
The bundle marks multiple Linux kernel releases from 4.6 through 6.11 branches as affected, but its flattened version data does not clearly define branch-specific boundaries. Prioritize systems using cgroup v1 cpuset mounts and allowing low-privileged local access. Confirm exposure through the relevant distribution advisory.
Exploitation context
The supplied record is not in KEV, and no cited source reports active exploitation. The issue was reported through syzkaller and has a documented race-based reproduction. CVSS 3.1 rates it 7.0 with local access, low privileges, high complexity, and no user interaction required.
Researcher notes
The vulnerable lifetime assumption is that holding the root cpuset CSS protects css.cgroup and its root. Root CSS persists, but the separately allocated cgroup_root can be freed during unmount. The correction uses rcu_read_lock() around path resolution, relying on RCU-delayed freeing. Practical privilege escalation has not been demonstrated by the supplied sources.
Mitigation direction
Apply a vendor-supported kernel update containing the applicable upstream stable fix.
Consult distribution advisories to identify corrected kernel packages for each deployed release.
Prioritize systems using cgroup v1 cpuset or allowing untrusted local workloads.
Restrict unnecessary local access and cgroup-management privileges while updates are pending.
Validation and detection
Inventory running kernel versions and compare them with vendor advisories for CVE-2024-43853.
Verify the installed kernel package or source contains its corresponding stable fix.
Identify systems using cgroup v1 cpuset mounts and permitting low-privileged local access.
Confirm the corrected kernel is running after maintenance.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-43853 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.