CVE-2023-54107 (GCVE-0-2023-54107)
Vulnerability from cvelistv5
Published
2025-12-24 13:06
Modified
2026-10-15 21:41
Summary
In the Linux kernel, the following vulnerability has been resolved: blk-cgroup: dropping parent refcount after pd_free_fn() is done Some cgroup policies will access parent pd through child pd even after pd_offline_fn() is done. If pd_free_fn() for parent is called before child, then UAF can be triggered. Hence it's better to guarantee the order of pd_free_fn(). Currently refcount of parent blkg is dropped in __blkg_release(), which is before pd_free_fn() is called in blkg_free_work_fn() while blkg_free_work_fn() is called asynchronously. This patch make sure pd_free_fn() called from removing cgroup is ordered by delaying dropping parent refcount after calling pd_free_fn() for child. BTW, pd_free_fn() will also be called from blkcg_deactivate_policy() from deleting device, and following patches will guarantee the order.
Impacted products
Vendor Product Version
Linux Linux Version: d578c770c85233af592e54537f93f3831bde7e9a
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-54107",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-10-15T21:38:32.237187Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-10-15T21:41:39.921Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "block/blk-cgroup.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c7241babf0855d8a6180cd1743ff0ec34de40b4e",
              "status": "affected",
              "version": "d578c770c85233af592e54537f93f3831bde7e9a",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "block/blk-cgroup.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.18"
            },
            {
              "lessThan": "5.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.3",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nblk-cgroup: dropping parent refcount after pd_free_fn() is done\n\nSome cgroup policies will access parent pd through child pd even\nafter pd_offline_fn() is done. If pd_free_fn() for parent is called\nbefore child, then UAF can be triggered. Hence it\u0027s better to guarantee\nthe order of pd_free_fn().\n\nCurrently refcount of parent blkg is dropped in __blkg_release(), which\nis before pd_free_fn() is called in blkg_free_work_fn() while\nblkg_free_work_fn() is called asynchronously.\n\nThis patch make sure pd_free_fn() called from removing cgroup is ordered\nby delaying dropping parent refcount after calling pd_free_fn() for\nchild.\n\nBTW, pd_free_fn() will also be called from blkcg_deactivate_policy()\nfrom deleting device, and following patches will guarantee the order."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - Triggering requires local cgroup filesystem operations (mkdir/rmdir of nested cgroups, writes to io.max/io.weight/io.latency) plus block I/O to populate blkgs. There is no remote or adjacent-network path into blk-cgroup teardown.\nAC:L - Although the UAF arises from unordered asynchronous work items and timers, the attacker controls both sides \u2014 building the nested blkcg hierarchy, choosing the tear-down order and timing, looping thousands of create/destroy cycles, and loading system_wq to widen the window while pd_free_fn sleeps (hrtimer_cancel, blk_put_queue). The iocost/throttle timers also fire on their own, so the window recurs without any condition outside attacker influence.\nPR:L - An unprivileged local account with a delegated cgroup v2 subtree suffices \u2014 standard systemd user slices and rootless/OCI containers grant mkdir/rmdir plus ownership of the non-root io.max, io.weight and io.latency files in cgroups the user creates, and bfq/blk-throttle policies are active without any privileged setup. No real root in the initial namespace is needed.\nUI:N - The attacker performs the entire sequence \u2014 cgroup creation, I/O generation, and rmdir \u2014 in its own process with no action by any other user.\nS:U - The corruption is confined to kernel heap objects managed by the same kernel security authority; no VM, hypervisor, or IOMMU boundary is crossed.\nC:H - The freed parent ioc_gq/throtl_grp/bfq_group lives in a general kmalloc cache, and __propagate_weights()/current_hweight() read child_active_sum, child_inuse_sum, active and inuse straight out of the reclaimed slot, with results observable via io.stat and scheduling behaviour. Heap grooming turns this into a controllable kernel-memory disclosure primitive.\nI:H - __propagate_weights() performs read-modify-write arithmetic directly on the freed parent object (parent-\u003echild_active_sum += ..., parent-\u003echild_inuse_sum += ...) with deltas derived from attacker-chosen io.weight values, and throtl_rb_erase() writes rb-tree pointers into the freed parent service queue. Sprayed into an attacker-chosen reclaimed object, this is a write primitive leading to control-flow hijack and privilege escalation.\nA:H - Use-after-free access and modification of freed slab memory reliably produces KASAN splats, rb-tree/slab corruption, and kernel oops or panic, and the sequence can be repeated at will to crash the machine."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T09:17:19.939Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c7241babf0855d8a6180cd1743ff0ec34de40b4e"
        }
      ],
      "title": "blk-cgroup: dropping parent refcount after pd_free_fn() is done",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-54107",
    "datePublished": "2025-12-24T13:06:31.505Z",
    "dateReserved": "2025-12-24T13:02:52.517Z",
    "dateUpdated": "2026-10-15T21:41:39.921Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2023-54107\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-10-15T21:38:32.237187Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-10-15T21:38:32.925Z\"}}], \"cna\": {\"title\": \"blk-cgroup: dropping parent refcount after pd_free_fn() is done\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 7.8, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:L - Triggering requires local cgroup filesystem operations (mkdir/rmdir of nested cgroups, writes to io.max/io.weight/io.latency) plus block I/O to populate blkgs. There is no remote or adjacent-network path into blk-cgroup teardown.\\nAC:L - Although the UAF arises from unordered asynchronous work items and timers, the attacker controls both sides \\u2014 building the nested blkcg hierarchy, choosing the tear-down order and timing, looping thousands of create/destroy cycles, and loading system_wq to widen the window while pd_free_fn sleeps (hrtimer_cancel, blk_put_queue). The iocost/throttle timers also fire on their own, so the window recurs without any condition outside attacker influence.\\nPR:L - An unprivileged local account with a delegated cgroup v2 subtree suffices \\u2014 standard systemd user slices and rootless/OCI containers grant mkdir/rmdir plus ownership of the non-root io.max, io.weight and io.latency files in cgroups the user creates, and bfq/blk-throttle policies are active without any privileged setup. No real root in the initial namespace is needed.\\nUI:N - The attacker performs the entire sequence \\u2014 cgroup creation, I/O generation, and rmdir \\u2014 in its own process with no action by any other user.\\nS:U - The corruption is confined to kernel heap objects managed by the same kernel security authority; no VM, hypervisor, or IOMMU boundary is crossed.\\nC:H - The freed parent ioc_gq/throtl_grp/bfq_group lives in a general kmalloc cache, and __propagate_weights()/current_hweight() read child_active_sum, child_inuse_sum, active and inuse straight out of the reclaimed slot, with results observable via io.stat and scheduling behaviour. Heap grooming turns this into a controllable kernel-memory disclosure primitive.\\nI:H - __propagate_weights() performs read-modify-write arithmetic directly on the freed parent object (parent-\u003echild_active_sum += ..., parent-\u003echild_inuse_sum += ...) with deltas derived from attacker-chosen io.weight values, and throtl_rb_erase() writes rb-tree pointers into the freed parent service queue. Sprayed into an attacker-chosen reclaimed object, this is a write primitive leading to control-flow hijack and privilege escalation.\\nA:H - Use-after-free access and modification of freed slab memory reliably produces KASAN splats, rb-tree/slab corruption, and kernel oops or panic, and the sequence can be repeated at will to crash the machine.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"d578c770c85233af592e54537f93f3831bde7e9a\", \"lessThan\": \"c7241babf0855d8a6180cd1743ff0ec34de40b4e\", \"versionType\": \"git\"}], \"programFiles\": [\"block/blk-cgroup.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.18\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.18\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.3\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"block/blk-cgroup.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/c7241babf0855d8a6180cd1743ff0ec34de40b4e\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nblk-cgroup: dropping parent refcount after pd_free_fn() is done\\n\\nSome cgroup policies will access parent pd through child pd even\\nafter pd_offline_fn() is done. If pd_free_fn() for parent is called\\nbefore child, then UAF can be triggered. Hence it\u0027s better to guarantee\\nthe order of pd_free_fn().\\n\\nCurrently refcount of parent blkg is dropped in __blkg_release(), which\\nis before pd_free_fn() is called in blkg_free_work_fn() while\\nblkg_free_work_fn() is called asynchronously.\\n\\nThis patch make sure pd_free_fn() called from removing cgroup is ordered\\nby delaying dropping parent refcount after calling pd_free_fn() for\\nchild.\\n\\nBTW, pd_free_fn() will also be called from blkcg_deactivate_policy()\\nfrom deleting device, and following patches will guarantee the order.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.3\", \"versionStartIncluding\": \"5.18\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T09:17:19.939Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2023-54107\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-10-15T21:41:39.921Z\", \"dateReserved\": \"2025-12-24T13:02:52.517Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2025-12-24T13:06:31.505Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…