Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74D9F56B9E for ; Fri, 1 Mar 2024 21:16:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709327771; cv=none; b=CYxojJcFD5Z+5ICUuGTxehvjZEB2+tlZVYBvLDYaxXA72O2TGSOLljbcMBc+55aucj0WsmFx8zoJZaSKxChOkZ/bGBKoza8A3PrJlLMWBE4OMMDrHCbMrmDJViuysbhN35UIiyyqTMgP32savEC22SPWzheCj15B2Hd8ES/ynAo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709327771; c=relaxed/simple; bh=jEM7NuO0kmO0zGmG7A7M8rAxHZReTsZnS9Ic8suRU8M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VRt7vcH0erjLbhkJS01io84WfKc55tMPW1oWBiml1tQmmHWQcJ0OcC2SAyvgwbZj818PVamL0auQdiw7xdFDOGEmvAjVcMFameejSlHcp2q2CrWygN1gDaA8vBOZVsc/qllrErmGyzbt6D0VZB0+7a24JwhauD2Lv+CLdjXB+Fk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qaEmTg6f; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qaEmTg6f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EDFEC433F1; Fri, 1 Mar 2024 21:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709327771; bh=jEM7NuO0kmO0zGmG7A7M8rAxHZReTsZnS9Ic8suRU8M=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qaEmTg6fTxDqZZzWBLNYBPx5eGfp8DjRHtHR85x46VkRLVT7VpeTSDYkWIOmamrqz IDR8e3xSJR2jVB9YBcQDoaAwzD8YYGp9OJVNDPvyCvLZsnKndc+ENdQrSXIsP1Oj2G ycLm4lpN25I39R04JjAWKmG5ajI7mM3rQCEsNDDY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47075: nvmet: fix memory leak in nvmet_alloc_ctrl() Date: Fri, 1 Mar 2024 22:15:48 +0100 Message-ID: <2024030142-CVE-2021-47075-8d12@gregkh> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , Content-Transfer-Encoding: 8bit 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 94a39d61f80f and fixed in 5.10.40 with commit 4720f29acb3f Issue introduced in 5.7 with commit 94a39d61f80f and fixed in 5.12.7 with commit afb680ed7ecb Issue introduced in 5.7 with commit 94a39d61f80f and fixed in 5.13 with commit fec356a61aa3 Please see https://www.kernel.org or 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