CVE-2024-42152
nvmet: fix a possible leak when destroy a ctrl during qp establishment
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 2f3c22b1d3d7e86712253244797a651998c141fa; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 940a71f08ef153ef807f751310b0648d1fa5d0da; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 5502c1f1d0d7472706cc1f201aecf1c935d302d1; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 818004f2a380420c19872171be716174d4985e33; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4
- Anyone running Linux 5.6
Vulnerability facts
- Affected
- Linux >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 2f3c22b1d3d7e86712253244797a651998c141fa; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 940a71f08ef153ef807f751310b0648d1fa5d0da; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 5502c1f1d0d7472706cc1f201aecf1c935d302d1; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 818004f2a380420c19872171be716174d4985e33; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4; Linux 5.6
- Fixed in
- Linux 2f3c22b1d3d7e86712253244797a651998c141fa, Linux 940a71f08ef153ef807f751310b0648d1fa5d0da, Linux 5502c1f1d0d7472706cc1f201aecf1c935d302d1, Linux 818004f2a380420c19872171be716174d4985e33
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 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
- EPSS
- 0.99% chance of exploitation in 30 days (percentile 61, 2026-11-26)
- CWE
- CWE-401
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: nvmet: fix a possible leak when destroy a ctrl during qp establishment In nvmet_sq_destroy we capture sq->ctrl early and if it is non-NULL we know that a ctrl was allocated (in the admin connect request handler) and we need to release pending AERs, clear ctrl->sqs and sq->ctrl (for nvme-loop primarily), and drop the final reference on the ctrl. However, a small window is possible where nvmet_sq_destroy starts (as a result of the client giving up and disconnecting) concurrently with the nvme admin connect cmd (which may be in an early stage). But *before* kill_and_confirm of sq->ref (i.e. the admin connect managed to get an sq live reference). In this case, sq->ctrl was allocated however after it was captured in a local variable in nvmet_sq_destroy. This prevented the final reference drop on the ctrl. Solve this by re-capturing the sq->ctrl after all inflight request has completed, where for sure sq->ctrl reference is final, and move forward based on that. This issue was observed in an environment with many hosts connecting multiple ctrls simoutanuosly, creating a delay in allocating a ctrl leading up to this race window.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 2f3c22b1d3d7e86712253244797a651998c141fa; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 940a71f08ef153ef807f751310b0648d1fa5d0da; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 5502c1f1d0d7472706cc1f201aecf1c935d302d1; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 818004f2a380420c19872171be716174d4985e33; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4 | — | cvelist |
| Linux | 5.6 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-42152. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-42152.md Affected: Linux >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 2f3c22b1d3d7e86712253244797a651998c141fa; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 940a71f08ef153ef807f751310b0648d1fa5d0da; >= 0f5be6a4ff7b3f8bf3db15f… Fixed in: Linux 2f3c22b1d3d7e86712253244797a651998c141fa, Linux 940a71f08ef153ef807f751310b0648d1fa5d0da, Linux 5502c1f1d0d7472706cc1f201aecf1c935d302d1, Linux 818004f2a380420c19872171be716174d4985e33 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.
References
Patches
- https://git.kernel.org/stable/c/2f3c22b1d3d7e86712253244797a651998c141fa
- https://git.kernel.org/stable/c/b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5
- https://git.kernel.org/stable/c/940a71f08ef153ef807f751310b0648d1fa5d0da
- https://git.kernel.org/stable/c/5502c1f1d0d7472706cc1f201aecf1c935d302d1
- https://git.kernel.org/stable/c/818004f2a380420c19872171be716174d4985e33
- https://git.kernel.org/stable/c/c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4
FAQ
Is CVE-2024-42152 being exploited?
There is no confirmed exploitation: CVE-2024-42152 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.99% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-42152?
High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2024-42152?
Linux >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 2f3c22b1d3d7e86712253244797a651998c141fa; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 940a71f08ef153ef807f751310b0648d1fa5d0da; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 5502c1f1d0d7472706cc1f201aecf1c935d302d1; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < 818004f2a380420c19872171be716174d4985e33; >= 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a, < c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4; Linux 5.6.
Is there a fix for CVE-2024-42152?
Yes. Fixed in Linux 2f3c22b1d3d7e86712253244797a651998c141fa, Linux 940a71f08ef153ef807f751310b0648d1fa5d0da, Linux 5502c1f1d0d7472706cc1f201aecf1c935d302d1, Linux 818004f2a380420c19872171be716174d4985e33. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2024-42152?
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.