# CVE-2023-54227: blk-mq: fix tags leak when shrink nr\_hw\_queues

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.75% (percentile 51, 2026-11-26)
- **Published:** 2025-12-30T12:11:20.207Z
- **Modified:** 2026-10-28T19:10:00.193Z

## Who should check

- Anyone running Linux \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< 26d495f0f64d8cd4fcd29206ee5c653ee0e0cbcd; \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< c0ef7493e68b8896806a2f598fcffbaa97333405; \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< e1dd7bc93029024af5688253b0c05181d6e01f8e
- Anyone running Linux 5.16

## Description

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.

## Affected and fixed versions

- Linux: \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< 26d495f0f64d8cd4fcd29206ee5c653ee0e0cbcd; \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< c0ef7493e68b8896806a2f598fcffbaa97333405; \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< e1dd7bc93029024af5688253b0c05181d6e01f8e (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-54227. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-54227.md
Affected: Linux >= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, < 26d495f0f64d8cd4fcd29206ee5c653ee0e0cbcd; >= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, < c0ef7493e68b8896806a2f598fcffbaa97333405; >= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, < e1dd7bc93029024af5688253b0c05181d6e01f8e; Linux 5.16
Fixed in: Linux 26d495f0f64d8cd4fcd29206ee5c653ee0e0cbcd

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-54227 being exploited?

There is no confirmed exploitation: CVE-2023-54227 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.75% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-54227?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2023-54227?

Linux \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< 26d495f0f64d8cd4fcd29206ee5c653ee0e0cbcd; \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< c0ef7493e68b8896806a2f598fcffbaa97333405; \>= a846a8e6c9a5949582c5a6a8bbc83a7d27fd891e, \< e1dd7bc93029024af5688253b0c05181d6e01f8e; Linux 5.16.

### Is there a fix for CVE-2023-54227?

Yes. Fixed in Linux 26d495f0f64d8cd4fcd29206ee5c653ee0e0cbcd. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-54227?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/26d495f0f64d8cd4fcd29206ee5c653ee0e0cbcd>
- other: <https://git.kernel.org/stable/c/c0ef7493e68b8896806a2f598fcffbaa97333405>
- other: <https://git.kernel.org/stable/c/e1dd7bc93029024af5688253b0c05181d6e01f8e>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-54227>

HTML: <https://flawdb.com/CVE-2023-54227> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-54227>
