CVE-2024-42152
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
30/07/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
nvmet: fix a possible leak when destroy a ctrl during qp establishment<br />
<br />
In nvmet_sq_destroy we capture sq->ctrl early and if it is non-NULL we<br />
know that a ctrl was allocated (in the admin connect request handler)<br />
and we need to release pending AERs, clear ctrl->sqs and sq->ctrl<br />
(for nvme-loop primarily), and drop the final reference on the ctrl.<br />
<br />
However, a small window is possible where nvmet_sq_destroy starts (as<br />
a result of the client giving up and disconnecting) concurrently with<br />
the nvme admin connect cmd (which may be in an early stage). But *before*<br />
kill_and_confirm of sq->ref (i.e. the admin connect managed to get an sq<br />
live reference). In this case, sq->ctrl was allocated however after it was<br />
captured in a local variable in nvmet_sq_destroy.<br />
This prevented the final reference drop on the ctrl.<br />
<br />
Solve this by re-capturing the sq->ctrl after all inflight request has<br />
completed, where for sure sq->ctrl reference is final, and move forward<br />
based on that.<br />
<br />
This issue was observed in an environment with many hosts connecting<br />
multiple ctrls simoutanuosly, creating a delay in allocating a ctrl<br />
leading up to this race window.
Impact
Base Score 3.x
4.70
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.8 (including) | 5.10.222 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.163 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.98 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.39 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.9.9 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.10:rc1:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/2f3c22b1d3d7e86712253244797a651998c141fa
- https://git.kernel.org/stable/c/5502c1f1d0d7472706cc1f201aecf1c935d302d1
- https://git.kernel.org/stable/c/818004f2a380420c19872171be716174d4985e33
- https://git.kernel.org/stable/c/940a71f08ef153ef807f751310b0648d1fa5d0da
- https://git.kernel.org/stable/c/b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5
- https://git.kernel.org/stable/c/c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4
- https://git.kernel.org/stable/c/2f3c22b1d3d7e86712253244797a651998c141fa
- https://git.kernel.org/stable/c/5502c1f1d0d7472706cc1f201aecf1c935d302d1
- https://git.kernel.org/stable/c/818004f2a380420c19872171be716174d4985e33
- https://git.kernel.org/stable/c/940a71f08ef153ef807f751310b0648d1fa5d0da
- https://git.kernel.org/stable/c/b4fed1443a6571d49c6ffe7d97af3bbe5ee6dff5
- https://git.kernel.org/stable/c/c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



