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 6BD0E12CDBF for ; Wed, 1 May 2024 13:07:29 +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=1714568849; cv=none; b=bLMDqQzpuHIm3f6/IIOJUxpzIdEJ3MM665i7e32f/jR9Lr5N2xHg3lqraKPrQTA5rvMGlBszLx2PfVmQ38YhZlbAXWzfHny9G2evDeGtDLROV6aV7/GCG5AzGEBZ2aaH0wP1H2QYbryjSu4/SQLzQDHvDFRk6zxrwe6orDN4ty4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568849; c=relaxed/simple; bh=8kgHrqh6YtdtUbBFe++lVBvqOPwlAxWOD9X/+JY/K8A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dEZIA284V/le+QGSkTlt82ar9RfNV3wljHfE7V/2FQy2dNZPujX9iSTsP4VL5pOEpznlYfI01DGUfAehEbSg15tjBVwRtQMA8D2wdxwkQt4m/+pD5NTpAFoM85yhlwFFU2vpU4lwoU9FE1L7/0870BqbEocSm/Lk33UoUk5X6hI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=naVRnWQl; 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="naVRnWQl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98F99C113CC; Wed, 1 May 2024 13:07:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714568849; bh=8kgHrqh6YtdtUbBFe++lVBvqOPwlAxWOD9X/+JY/K8A=; h=From:To:Cc:Subject:Date:Reply-to:From; b=naVRnWQl6MnvVae7GXpAuzCM6PyUC0JvEqEhm8JSdpkp/5nilp4ByfFAJi0TTnQ5s dxNMWps4KngA956PolHwC1Lz0/m5Fyz1X7DnwxDGaTMLDke+NNzej5rXE4cjMhjhp5 PDthtkkCFFk3HSrUTqxBi7gN/gjEwO3DMFrno4xo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27392: nvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse() Date: Wed, 1 May 2024 15:06:56 +0200 Message-ID: <2024050136-CVE-2024-27392-b84b@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: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2055; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8kgHrqh6YtdtUbBFe++lVBvqOPwlAxWOD9X/+JY/K8A=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGdjGJpf4HWzzOrPew/mD4e6ZWid2Rxu2ekbOnRG3Ob 77i0BLQEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOp6mWYX8Siq56e53lKd/uk OK+krWW+MyqvMswz3H18+6f4/Bebd6jseSs9/VdEW4YxAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: nvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse() When nvme_identify_ns() fails, it frees the pointer to the struct nvme_id_ns before it returns. However, ns_update_nuse() calls kfree() for the pointer even when nvme_identify_ns() fails. This results in KASAN double-free, which was observed with blktests nvme/045 with proposed patches [1] on the kernel v6.8-rc7. Fix the double-free by skipping kfree() when nvme_identify_ns() fails. The Linux kernel CVE team has assigned CVE-2024-27392 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit a1a825ab6a60 and fixed in 6.8.2 with commit 534f9dc7fe49 Issue introduced in 6.8 with commit a1a825ab6a60 and fixed in 6.9-rc1 with commit 8d0d2447394b 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-2024-27392 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/host/sysfs.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/534f9dc7fe495b3f9cc84363898ac50c5a25fccb https://git.kernel.org/stable/c/8d0d2447394b13fb22a069f0330f9c49b7fff9d3