| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2021-47075: nvmet: fix memory leak in nvmet_alloc_ctrl() |
| |
| 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. |
| |
| The Linux kernel CVE team has assigned CVE-2021-47075 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.7 with commit 94a39d61f80fcd679debda11e1ca02b88d90e67e and fixed in 5.10.40 with commit 4720f29acb3fe67aa8aa71e6b675b079d193aaeb |
| Issue introduced in 5.7 with commit 94a39d61f80fcd679debda11e1ca02b88d90e67e and fixed in 5.12.7 with commit afb680ed7ecbb7fd66ddb43650e9b533fd8b4b9a |
| Issue introduced in 5.7 with commit 94a39d61f80fcd679debda11e1ca02b88d90e67e and fixed in 5.13 with commit fec356a61aa3d3a66416b4321f1279e09e0f256f |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2021-47075 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| drivers/nvme/target/core.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/4720f29acb3fe67aa8aa71e6b675b079d193aaeb |
| https://git.kernel.org/stable/c/afb680ed7ecbb7fd66ddb43650e9b533fd8b4b9a |
| https://git.kernel.org/stable/c/fec356a61aa3d3a66416b4321f1279e09e0f256f |