# CVE-2021-47075: nvmet: fix memory leak in nvmet_alloc_ctrl()

- Severity: Medium 5.3 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.91%, higher than 60% of CVEs (2026-12-01)
- Published: 2024-03-01T21:15:12.739Z
- Modified: 2026-06-17T04:16:24.037Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

nvmet: fix memory leak in nvmet_alloc_ctrl()

When creating ctrl in nvmet_alloc_ctrl(), if the cntlid_min is larger
than cntlid_max of the subsystem, and jumps to the
"out_free_changed_ns_list" label, but the ctrl->sqs lack of be freed.
Fix this by jumping to the "out_free_sqs" label.

(As written by CVE List.)

## Affected

- Linux Linux: from 94a39d61f80fcd679debda11e1ca02b88d90e67e before 4720f29acb3fe67aa8aa71e6b675b079d193aaeb; from 94a39d61f80fcd679debda11e1ca02b88d90e67e before afb680ed7ecbb7fd66ddb43650e9b533fd8b4b9a; from 94a39d61f80fcd679debda11e1ca02b88d90e67e before fec356a61aa3d3a66416b4321f1279e09e0f256f; 5.7 (not affected: before 5.7; from 5.10.40 up to 5.10.*; from 5.12.7 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.7 before 5.10.40; from 5.11 before 5.12.7; 5.13

## References

- <https://git.kernel.org/stable/c/4720f29acb3fe67aa8aa71e6b675b079d193aaeb> (patch)
- <https://git.kernel.org/stable/c/afb680ed7ecbb7fd66ddb43650e9b533fd8b4b9a> (patch)
- <https://git.kernel.org/stable/c/fec356a61aa3d3a66416b4321f1279e09e0f256f> (patch)

## Sources

- CVE List: [CVE-2021-47075](https://www.cve.org/CVERecord?id=CVE-2021-47075), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47075](https://nvd.nist.gov/vuln/detail/CVE-2021-47075), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47075 · Whole record: https://cve.day/CVE-2021-47075.json · Rebuilt by cve.day 2026-11-25T22:58:08.648Z
