GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2023-54227 (GCVE-0-2023-54227)

Vulnerability from cvelistv5 – Published: 2025-12-30 12:11 – Updated: 2026-08-05 09:18
VLAI
Title
blk-mq: fix tags leak when shrink nr_hw_queues
Summary
In the Linux kernel, the following vulnerability has been resolved: blk-mq: fix tags leak when shrink nr_hw_queues Although we don't need to realloc set->tags[] when shrink nr_hw_queues, we need to free them. Or these tags will be leaked. How to reproduce: 1. mount -t configfs configfs /mnt 2. modprobe null_blk nr_devices=0 submit_queues=8 3. mkdir /mnt/nullb/nullb0 4. echo 1 > /mnt/nullb/nullb0/power 5. echo 4 > /mnt/nullb/nullb0/submit_queues 6. rmdir /mnt/nullb/nullb0 In step 4, will alloc 9 tags (8 submit queues and 1 poll queue), then in step 5, new_nr_hw_queues = 5 (4 submit queues and 1 poll queue). At last in step 6, only these 5 tags are freed, the other 4 tags leaked.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e , < c0ef7493e68b8896806a2f598fcffbaa97333405 (git)
Affected: a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e , < e1dd7bc93029024af5688253b0c05181d6e01f8e (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.16
Unaffected: 0 , < 5.16 (semver)
Unaffected: 6.5.5 , ≤ 6.5.* (semver)
Unaffected: 6.6 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "block/blk-mq.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c0ef7493e68b8896806a2f598fcffbaa97333405",
              "status": "affected",
              "version": "a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e",
              "versionType": "git"
            },
            {
              "lessThan": "e1dd7bc93029024af5688253b0c05181d6e01f8e",
              "status": "affected",
              "version": "a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "block/blk-mq.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.16"
            },
            {
              "lessThan": "5.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.5.*",
              "status": "unaffected",
              "version": "6.5.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.6",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.5.5",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nblk-mq: fix tags leak when shrink nr_hw_queues\n\nAlthough we don\u0027t need to realloc set-\u003etags[] when shrink nr_hw_queues,\nwe need to free them. Or these tags will be leaked.\n\nHow to reproduce:\n1. mount -t configfs configfs /mnt\n2. modprobe null_blk nr_devices=0 submit_queues=8\n3. mkdir /mnt/nullb/nullb0\n4. echo 1 \u003e /mnt/nullb/nullb0/power\n5. echo 4 \u003e /mnt/nullb/nullb0/submit_queues\n6. rmdir /mnt/nullb/nullb0\n\nIn step 4, will alloc 9 tags (8 submit queues and 1 poll queue), then\nin step 5, new_nr_hw_queues = 5 (4 submit queues and 1 poll queue).\nAt last in step 6, only these 5 tags are freed, the other 4 tags leaked."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The shrink is driven by remote-peer data on NVMe-oF hosts \u2014 `nvme_set_queue_count()` takes the I/O queue count verbatim from the target\u0027s Set Features completion and feeds it to `blk_mq_update_nr_hw_queues()` on every reconnect, with the tag set persisting across reconnects. A hostile/compromised target or on-path attacker on an unauthenticated NVMe/TCP fabric reaches the vulnerable code over the network.\nAC:L - The attacker fully controls the granted queue count in each Set Features response and can force reconnects at will by closing the transport connection, so each shrink\u2192grow cycle is triggered deterministically with no conditions outside the attacker\u0027s control.\nPR:N - The remote peer needs no credentials on the victim host; NVMe/TCP in the affected 5.16\u20136.5 range has no in-band authentication or TLS, and the queue-count negotiation happens automatically during controller reconnect.\nUI:N - Reconnect and queue renegotiation are fully automatic in the nvme fabrics keep-alive/reconnect path; no administrator or user action is needed at exploitation time.\nS:U - The leaked allocations and the resulting memory pressure are confined to the kernel of the affected host; no security authority boundary such as a VM or IOMMU domain is crossed.\nC:N - The leaked `blk_mq_tags` and request pages are simply never freed \u2014 they are not read, exposed, or transmitted anywhere, so no information is disclosed to the attacker.\nI:N - No out-of-bounds write, use-after-free, or type confusion occurs; the stale pointers are only dropped, leaving no primitive to modify kernel or user data.\nA:H - Because the regrow path memcpy\u0027s only the shrunken count and frees the old array, every shrink\u2192grow cycle permanently leaks a full per-queue request pool, making the leak unbounded and repeatable until kernel memory is exhausted and the system OOMs or hangs."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T09:18:13.008Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c0ef7493e68b8896806a2f598fcffbaa97333405"
        },
        {
          "url": "https://git.kernel.org/stable/c/e1dd7bc93029024af5688253b0c05181d6e01f8e"
        }
      ],
      "title": "blk-mq: fix tags leak when shrink nr_hw_queues",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-54227",
    "datePublished": "2025-12-30T12:11:20.207Z",
    "dateReserved": "2025-12-30T12:06:44.502Z",
    "dateUpdated": "2026-08-05T09:18:13.008Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2023-54227",
      "date": "2026-09-14",
      "epss": "0.00403",
      "percentile": "0.33832"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-54227\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-30T13:16:11.093\",\"lastModified\":\"2026-08-04T11:16:37.687\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nblk-mq: fix tags leak when shrink nr_hw_queues\\n\\nAlthough we don\u0027t need to realloc set-\u003etags[] when shrink nr_hw_queues,\\nwe need to free them. Or these tags will be leaked.\\n\\nHow to reproduce:\\n1. mount -t configfs configfs /mnt\\n2. modprobe null_blk nr_devices=0 submit_queues=8\\n3. mkdir /mnt/nullb/nullb0\\n4. echo 1 \u003e /mnt/nullb/nullb0/power\\n5. echo 4 \u003e /mnt/nullb/nullb0/submit_queues\\n6. rmdir /mnt/nullb/nullb0\\n\\nIn step 4, will alloc 9 tags (8 submit queues and 1 poll queue), then\\nin step 5, new_nr_hw_queues = 5 (4 submit queues and 1 poll queue).\\nAt last in step 6, only these 5 tags are freed, the other 4 tags leaked.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"block/blk-mq.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e\",\"lessThan\":\"c0ef7493e68b8896806a2f598fcffbaa97333405\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e\",\"lessThan\":\"e1dd7bc93029024af5688253b0c05181d6e01f8e\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"block/blk-mq.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.16\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.16\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.5.5\",\"lessThanOrEqual\":\"6.5.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":7.5,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":3.6}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/c0ef7493e68b8896806a2f598fcffbaa97333405\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e1dd7bc93029024af5688253b0c05181d6e01f8e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-08-04T22:53:29+00:00",
      "cve": "CVE-2023-54227",
      "id": "CVE-2023-54227",
      "initial_release_date": "2023-01-01T00:00:00+00:00",
      "product_status:fixed": "280",
      "product_status:known_affected": "98",
      "product_status:known_not_affected": "98",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: blk-mq: fix tags leak when shrink nr_hw_queues",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2023/cve-2023-54227.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-02T01:40:40Z",
      "cve": "CVE-2023-54227",
      "id": "CVE-2023-54227",
      "initial_release_date": "2025-12-31T00:28:02Z",
      "product_status:known_affected": "569",
      "product_status:known_not_affected": "248",
      "product_status:recommended": "212",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2023-54227",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2023-54227.json",
      "version": "35"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…