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 B9FE825D203 for ; Fri, 2 May 2025 16:01:56 +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=1746201716; cv=none; b=XeF73KyEBf1Y4U3Crs9N+epZG+kJ+2rZoWC+GiyBrZIr3/c3umPCmN/jTWrZaZazt819qbuF3UptSnxdoKqf7k9eQ7zdv+XSX9Zr4wEWpW0+JdlKJflynruMLwIMDUnQswyKqhTjR/+F0QPDKashEaOaFB6D0hTpdvTz/7ln2rc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746201716; c=relaxed/simple; bh=vOY1GYQyg8Ahn9UhJ8KZZx5XRoFeOhnmfrK/rYi2lnw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dcNTfSpZ4r91TOpNK3+ZtZfGtN0xMmVqeefHnv/2g1JDa2DGsO/N4lw6bedzM9rxD5TXCRFjIb706z8V1bQ+q8iL38tbl1YNvE00n8lxgySjMG8TbmwqKA2KslK4gYLYo3Ydr2o76bGeahEOtfLuZFpLpwmd3ZnHM0g6AGY5cdw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lurdZZfh; 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="lurdZZfh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 220F7C4CEE4; Fri, 2 May 2025 16:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746201716; bh=vOY1GYQyg8Ahn9UhJ8KZZx5XRoFeOhnmfrK/rYi2lnw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=lurdZZfhmY/DQuSYfP63n/Yc9FgqX1vMhqrU0xYZErv68lTsW0I6Pk1k2B5HHRIkK Eg088/hI6o95j5FPNn63nyWQO4SzvNzVvDNt4PX/Z2x1+m2AQP+1LtFh+3jt22TqIG FwSoUFNhiHHyJNl8Lmm18C703IsUNne8+0tNqAvg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53116: nvmet: avoid potential UAF in nvmet_req_complete() Date: Fri, 2 May 2025 17:56:21 +0200 Message-ID: <2025050229-CVE-2023-53116-469c@gregkh> X-Mailer: git-send-email 2.49.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=3556; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Iv2hcZmoU4j6gfTeoWCmPUApj/f5N3zbUIkeIAgjXqE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkirz6KL9jcYdB3ZsWT28VhJxt15z9ucq05pXV7+/TZJ RvVIi4s7IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJLNjIMIdrprpR+pFqoxPh Nn5r5/7vNWezymZYcNPQSa7p4E7lngq186/8H3EZeB+4DwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: nvmet: avoid potential UAF in nvmet_req_complete() An nvme target ->queue_response() operation implementation may free the request passed as argument. Such implementation potentially could result in a use after free of the request pointer when percpu_ref_put() is called in nvmet_req_complete(). Avoid such problem by using a local variable to save the sq pointer before calling __nvmet_req_complete(), thus avoiding dereferencing the req pointer after that function call. The Linux kernel CVE team has assigned CVE-2023-53116 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 4.14.311 with commit e5d99b29012bbf0e86929403209723b2806500c1 Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 4.19.279 with commit fafcb4b26393870c45462f9af6a48e581dbbcf7e Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 5.4.238 with commit 04c394208831d5e0d5cfee46722eb0f033cd4083 Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 5.10.176 with commit a6317235da8aa7cb97529ebc8121cc2a4c4c437a Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 5.15.104 with commit f1d5888a5efe345b63c430b256e95acb0a475642 Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 6.1.21 with commit bcd535f07c58342302a2cd2bdd8894fe0872c8a9 Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 6.2.8 with commit 8ed9813871038b25a934b21ab76b5b7dbf44fc3a Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 6.3 with commit 6173a77b7e9d3e202bdb9897b23f2a8afe7bf286 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-2023-53116 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/e5d99b29012bbf0e86929403209723b2806500c1 https://git.kernel.org/stable/c/fafcb4b26393870c45462f9af6a48e581dbbcf7e https://git.kernel.org/stable/c/04c394208831d5e0d5cfee46722eb0f033cd4083 https://git.kernel.org/stable/c/a6317235da8aa7cb97529ebc8121cc2a4c4c437a https://git.kernel.org/stable/c/f1d5888a5efe345b63c430b256e95acb0a475642 https://git.kernel.org/stable/c/bcd535f07c58342302a2cd2bdd8894fe0872c8a9 https://git.kernel.org/stable/c/8ed9813871038b25a934b21ab76b5b7dbf44fc3a https://git.kernel.org/stable/c/6173a77b7e9d3e202bdb9897b23f2a8afe7bf286