cve-2024-43853
Vulnerability from cvelistv5
Published
2024-08-17 09:22
Modified
2024-12-19 09:17
Severity ?
Summary
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
Impacted products
Vendor Product Version
Linux Linux Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Version: a79a908fd2b080977b45bf103184b81c9d11ad07
Create a notification for this product.
   Linux Linux Version: 4.6
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-43853",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:07:17.671649Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-12T17:33:20.917Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/cgroup/cpuset.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "27d6dbdc6485d68075a0ebf8544d6425c1ed84bb",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            },
            {
              "lessThan": "10aeaa47e4aa2432f29b3e5376df96d7dac5537a",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            },
            {
              "lessThan": "688325078a8b5badd6e07ae22b27cd04e9947aec",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            },
            {
              "lessThan": "4e8d6ac8fc9f843e940ab7389db8136634e07989",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            },
            {
              "lessThan": "29a8d4e02fd4840028c38ceb1536cc8f82a257d4",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            },
            {
              "lessThan": "96226fbed566f3f686f53a489a29846f2d538080",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            },
            {
              "lessThan": "29ac1d238b3bf126af36037df80d7ecc4822341e",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            },
            {
              "lessThan": "1be59c97c83ccd67a519d8a49486b3a8a73ca28a",
              "status": "affected",
              "version": "a79a908fd2b080977b45bf103184b81c9d11ad07",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/cgroup/cpuset.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.6"
            },
            {
              "lessThan": "4.6",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.321",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.283",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.225",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.166",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.103",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.44",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.11",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncgroup/cpuset: Prevent UAF in proc_cpuset_show()\n\nAn UAF can happen when /proc/cpuset is read as reported in [1].\n\nThis can be reproduced by the following methods:\n1.add an mdelay(1000) before acquiring the cgroup_lock In the\n cgroup_path_ns function.\n2.$cat /proc/\u003cpid\u003e/cpuset   repeatly.\n3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/\n$umount /sys/fs/cgroup/cpuset/   repeatly.\n\nThe race that cause this bug can be shown as below:\n\n(umount)\t\t|\t(cat /proc/\u003cpid\u003e/cpuset)\ncss_release\t\t|\tproc_cpuset_show\ncss_release_work_fn\t|\tcss = task_get_css(tsk, cpuset_cgrp_id);\ncss_free_rwork_fn\t|\tcgroup_path_ns(css-\u003ecgroup, ...);\ncgroup_destroy_root\t|\tmutex_lock(\u0026cgroup_mutex);\nrebind_subsystems\t|\ncgroup_free_root \t|\n\t\t\t|\t// cgrp was freed, UAF\n\t\t\t|\tcgroup_path_ns_locked(cgrp,..);\n\nWhen the cpuset is initialized, the root node top_cpuset.css.cgrp\nwill point to \u0026cgrp_dfl_root.cgrp. In cgroup v1, the mount operation will\nallocate cgroup_root, and top_cpuset.css.cgrp will point to the allocated\n\u0026cgroup_root.cgrp. When the umount operation is executed,\ntop_cpuset.css.cgrp will be rebound to \u0026cgrp_dfl_root.cgrp.\n\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-\u003eroot will not be freed.\n\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-\u003ecgroup won\u0027t 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\n[1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T09:17:11.037Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/27d6dbdc6485d68075a0ebf8544d6425c1ed84bb"
        },
        {
          "url": "https://git.kernel.org/stable/c/10aeaa47e4aa2432f29b3e5376df96d7dac5537a"
        },
        {
          "url": "https://git.kernel.org/stable/c/688325078a8b5badd6e07ae22b27cd04e9947aec"
        },
        {
          "url": "https://git.kernel.org/stable/c/4e8d6ac8fc9f843e940ab7389db8136634e07989"
        },
        {
          "url": "https://git.kernel.org/stable/c/29a8d4e02fd4840028c38ceb1536cc8f82a257d4"
        },
        {
          "url": "https://git.kernel.org/stable/c/96226fbed566f3f686f53a489a29846f2d538080"
        },
        {
          "url": "https://git.kernel.org/stable/c/29ac1d238b3bf126af36037df80d7ecc4822341e"
        },
        {
          "url": "https://git.kernel.org/stable/c/1be59c97c83ccd67a519d8a49486b3a8a73ca28a"
        }
      ],
      "title": "cgroup/cpuset: Prevent UAF in proc_cpuset_show()",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-43853",
    "datePublished": "2024-08-17T09:22:10.534Z",
    "dateReserved": "2024-08-17T09:11:59.277Z",
    "dateUpdated": "2024-12-19T09:17:11.037Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-43853\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-08-17T10:15:10.383\",\"lastModified\":\"2024-09-04T12:15:04.827\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncgroup/cpuset: Prevent UAF in proc_cpuset_show()\\n\\nAn UAF can happen when /proc/cpuset is read as reported in [1].\\n\\nThis can be reproduced by the following methods:\\n1.add an mdelay(1000) before acquiring the cgroup_lock In the\\n cgroup_path_ns function.\\n2.$cat /proc/\u003cpid\u003e/cpuset   repeatly.\\n3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/\\n$umount /sys/fs/cgroup/cpuset/   repeatly.\\n\\nThe race that cause this bug can be shown as below:\\n\\n(umount)\\t\\t|\\t(cat /proc/\u003cpid\u003e/cpuset)\\ncss_release\\t\\t|\\tproc_cpuset_show\\ncss_release_work_fn\\t|\\tcss = task_get_css(tsk, cpuset_cgrp_id);\\ncss_free_rwork_fn\\t|\\tcgroup_path_ns(css-\u003ecgroup, ...);\\ncgroup_destroy_root\\t|\\tmutex_lock(\u0026cgroup_mutex);\\nrebind_subsystems\\t|\\ncgroup_free_root \\t|\\n\\t\\t\\t|\\t// cgrp was freed, UAF\\n\\t\\t\\t|\\tcgroup_path_ns_locked(cgrp,..);\\n\\nWhen the cpuset is initialized, the root node top_cpuset.css.cgrp\\nwill point to \u0026cgrp_dfl_root.cgrp. In cgroup v1, the mount operation will\\nallocate cgroup_root, and top_cpuset.css.cgrp will point to the allocated\\n\u0026cgroup_root.cgrp. When the umount operation is executed,\\ntop_cpuset.css.cgrp will be rebound to \u0026cgrp_dfl_root.cgrp.\\n\\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-\u003eroot will not be freed.\\n\\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-\u003ecgroup won\u0027t 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\\n[1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: cgroup/cpuset: Prevenir UAF en proc_cpuset_show() Puede ocurrir un UAF cuando se lee /proc/cpuset como se informa en [1]. Esto se puede reproducir mediante los siguientes m\u00e9todos: 1.Agregue un mdelay(1000) antes de adquirir cgroup_lock en la funci\u00f3n cgroup_path_ns. 2.$cat /proc//cpuset repetidamente. 3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/ $umount /sys/fs/cgroup/cpuset/ repetidamente. La ejecuci\u00f3n que causa este error se puede mostrar a continuaci\u00f3n: (umount) | (cat /proc//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-\u0026gt;cgroup, ...); cgroup_destroy_root | mutex_lock(\u0026amp;cgroup_mutex); rebind_subsistemas | cgroup_free_root | | // cgrp fue liberado, UAF | cgroup_path_ns_locked(cgrp,..); Cuando se inicializa cpuset, el nodo ra\u00edz top_cpuset.css.cgrp apuntar\u00e1 a \u0026amp;cgrp_dfl_root.cgrp. En cgroup v1, la operaci\u00f3n de montaje asignar\u00e1 cgroup_root y top_cpuset.css.cgrp apuntar\u00e1 al \u0026amp;cgroup_root.cgrp asignado. Cuando se ejecuta la operaci\u00f3n desmontaje, top_cpuset.css.cgrp se rebotar\u00e1 en \u0026amp;cgrp_dfl_root.cgrp. El problema es que al volver a vincular a cgrp_dfl_root, hay casos en los que el cgroup_root asignado al configurar la ra\u00edz para cgroup v1 se almacena en cach\u00e9. Esto podr\u00eda dar lugar a un use-after-free (UAF) si se libera posteriormente. Los cgroups descendientes de cgroup v1 solo se pueden liberar despu\u00e9s de que se publique el CSS. Sin embargo, el CSS de la ra\u00edz nunca se liberar\u00e1, pero cgroup_root debe liberarse cuando se desmonta. Esto significa que obtener una referencia al CSS de la ra\u00edz no garantiza que css.cgrp-\u0026gt;root no se libere. Solucione este problema usando rcu_read_lock en proc_cpuset_show(). Como cgroup_root es kfree_rcu despu\u00e9s del commit d23b5c577715 (\\\"cgroup: hacer que las operaciones en la RCU cgroup root_list sean seguras\\\"), css-\u0026gt;cgroup no se liberar\u00e1 durante la secci\u00f3n cr\u00edtica. Para llamar a cgroup_path_ns_locked, se necesita css_set_lock, por lo que es seguro reemplazar task_get_css con task_css. [1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-416\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.6\",\"versionEndExcluding\":\"6.1.103\",\"matchCriteriaId\":\"B8828E57-70E4-428D-BC12-F89414C8715F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.44\",\"matchCriteriaId\":\"CC912330-6B41-4C6B-99AF-F3857FBACB6A\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.10.3\",\"matchCriteriaId\":\"92D388F2-1EAF-4CFA-AC06-5B26D762EA7D\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/10aeaa47e4aa2432f29b3e5376df96d7dac5537a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1be59c97c83ccd67a519d8a49486b3a8a73ca28a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/27d6dbdc6485d68075a0ebf8544d6425c1ed84bb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/29a8d4e02fd4840028c38ceb1536cc8f82a257d4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/29ac1d238b3bf126af36037df80d7ecc4822341e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/4e8d6ac8fc9f843e940ab7389db8136634e07989\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/688325078a8b5badd6e07ae22b27cd04e9947aec\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/96226fbed566f3f686f53a489a29846f2d538080\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-43853\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T16:07:17.671649Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:22.906Z\"}}], \"cna\": {\"title\": \"cgroup/cpuset: Prevent UAF in proc_cpuset_show()\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"27d6dbdc6485\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"10aeaa47e4aa\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"688325078a8b\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"4e8d6ac8fc9f\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"29a8d4e02fd4\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"96226fbed566\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"29ac1d238b3b\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a79a908fd2b0\", \"lessThan\": \"1be59c97c83c\", \"versionType\": \"git\"}], \"programFiles\": [\"kernel/cgroup/cpuset.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"4.6\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"4.6\", \"versionType\": \"custom\"}, {\"status\": \"unaffected\", \"version\": \"4.19.321\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"4.19.*\"}, {\"status\": \"unaffected\", \"version\": \"5.4.283\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"5.4.*\"}, {\"status\": \"unaffected\", \"version\": \"5.10.225\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.15.166\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1.103\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.44\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10.3\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"kernel/cgroup/cpuset.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/27d6dbdc6485d68075a0ebf8544d6425c1ed84bb\"}, {\"url\": \"https://git.kernel.org/stable/c/10aeaa47e4aa2432f29b3e5376df96d7dac5537a\"}, {\"url\": \"https://git.kernel.org/stable/c/688325078a8b5badd6e07ae22b27cd04e9947aec\"}, {\"url\": \"https://git.kernel.org/stable/c/4e8d6ac8fc9f843e940ab7389db8136634e07989\"}, {\"url\": \"https://git.kernel.org/stable/c/29a8d4e02fd4840028c38ceb1536cc8f82a257d4\"}, {\"url\": \"https://git.kernel.org/stable/c/96226fbed566f3f686f53a489a29846f2d538080\"}, {\"url\": \"https://git.kernel.org/stable/c/29ac1d238b3bf126af36037df80d7ecc4822341e\"}, {\"url\": \"https://git.kernel.org/stable/c/1be59c97c83ccd67a519d8a49486b3a8a73ca28a\"}], \"x_generator\": {\"engine\": \"bippy-c9c4e1df01b2\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncgroup/cpuset: Prevent UAF in proc_cpuset_show()\\n\\nAn UAF can happen when /proc/cpuset is read as reported in [1].\\n\\nThis can be reproduced by the following methods:\\n1.add an mdelay(1000) before acquiring the cgroup_lock In the\\n cgroup_path_ns function.\\n2.$cat /proc/\u003cpid\u003e/cpuset   repeatly.\\n3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/\\n$umount /sys/fs/cgroup/cpuset/   repeatly.\\n\\nThe race that cause this bug can be shown as below:\\n\\n(umount)\\t\\t|\\t(cat /proc/\u003cpid\u003e/cpuset)\\ncss_release\\t\\t|\\tproc_cpuset_show\\ncss_release_work_fn\\t|\\tcss = task_get_css(tsk, cpuset_cgrp_id);\\ncss_free_rwork_fn\\t|\\tcgroup_path_ns(css-\u003ecgroup, ...);\\ncgroup_destroy_root\\t|\\tmutex_lock(\u0026cgroup_mutex);\\nrebind_subsystems\\t|\\ncgroup_free_root \\t|\\n\\t\\t\\t|\\t// cgrp was freed, UAF\\n\\t\\t\\t|\\tcgroup_path_ns_locked(cgrp,..);\\n\\nWhen the cpuset is initialized, the root node top_cpuset.css.cgrp\\nwill point to \u0026cgrp_dfl_root.cgrp. In cgroup v1, the mount operation will\\nallocate cgroup_root, and top_cpuset.css.cgrp will point to the allocated\\n\u0026cgroup_root.cgrp. When the umount operation is executed,\\ntop_cpuset.css.cgrp will be rebound to \u0026cgrp_dfl_root.cgrp.\\n\\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-\u003eroot will not be freed.\\n\\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-\u003ecgroup won\u0027t 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\\n[1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-09-15T17:54:19.206Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-43853\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-09-15T17:54:19.206Z\", \"dateReserved\": \"2024-08-17T09:11:59.277Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-08-17T09:22:10.534Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.