CVE Details
Description
In the Linux kernel, the following vulnerability has been resolved:\ncgroup/cpuset: Prevent UAF in proc_cpuset_show()\nAn UAF can happen when /proc/cpuset is read as reported in [1].\nThis can be reproduced by the following methods:\n1.add an mdelay(1000) before acquiring the cgroup_lock In the\ncgroup_path_ns function.\n2. /proc//cpuset repeatly.\n3. -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/\n /sys/fs/cgroup/cpuset/ repeatly.\nThe race that cause this bug can be shown as below:\n(umount)|(cat /proc//cpuset)\ncss_release|proc_cpuset_show\ncss_release_work_fn|css = task_get_css(tsk, cpuset_cgrp_id);\ncss_free_rwork_fn|cgroup_path_ns(css->cgroup, ...);\ncgroup_destroy_root|mutex_lock(&cgroup_mutex);\nrebind_subsystems|\ncgroup_free_root |\n|// cgrp was freed, UAF\n|cgroup_path_ns_locked(cgrp,..);\nWhen the cpuset is initialized, the root node top_cpuset.css.cgrp\nwill point to &cgrp_dfl_root.cgrp. In cgroup v1, the mount operation will\nallocate cgroup_root, and top_cpuset.css.cgrp will point to the allocated\n&cgroup_root.cgrp. When the umount operation is executed,\ntop_cpuset.css.cgrp will be rebound to &cgrp_dfl_root.cgrp.\nThe problem is that when rebinding to cgrp_dfl_root, there are cases\nwhere the cgroup_root allocated by setting up the root for cgroup v1\nis cached. This could lead to a Use-After-Free (UAF) if it is\nsubsequently freed. The descendant cgroups of cgroup v1 can only be\nfreed after the css is released. However, the css of the root will never\nbe released, yet the cgroup_root should be freed when it is unmounted.\nThis means that obtaining a reference to the css of the root does\nnot guarantee that css.cgrp->root will not be freed.\nFix this problem by using rcu_read_lock in proc_cpuset_show().\nAs cgroup_root is kfree_rcu after commit d23b5c577715\n('cgroup: Make operations on the cgroup root_list RCU safe'),\ncss->cgroup won't be freed during the critical section.\nTo call cgroup_path_ns_locked, css_set_lock is needed, so it is safe to\nreplace task_get_css with task_css.\n[1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd
See more information about CVE-2024-43853 from MITRE CVE dictionary and NIST NVD
NOTE: The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 metrics
Base Score: | 7.0 |
Vector String: | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
Version: | 3.1 |
Attack Vector: | Local |
Attack Complexity: | High |
Privileges Required: | Low |
User Interaction: | None |
Scope: | Unchanged |
Confidentiality: | High |
Integrity: | High |
Availability: | High |
Errata information