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 B89912147F4 for ; Thu, 27 Mar 2025 16:46:04 +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=1743093964; cv=none; b=i1Fh7gu8q5+XBd/P8QfdNRnVDZiZfpD9ajZFIIpgzyzMGx/9upbg4fPdB6IVksRXMv5oMtE7R3LZSasVGTQwlCVtSU1H79LfSPO2VNHxPFpP6WM5EwUr7lTeN2j0SWcr2014qIgeWlvrPbL5ILqojFFwrssRZWOZpehKhXX3UlQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743093964; c=relaxed/simple; bh=qhY4b6FAox5SfM2drkA0wT4l4z1QBGw3fHIsggoYVOs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EwpnZacha1z79thZaBr8KlmKC4LXzVzunpdYnLCIeU66LHGEq2Aw+GzHDdSk8wL4pQIPPf6h26Ao6tcWRMVdqhmLepg7uPneAiHbyKMfW5cfi3GjnjgNfERQ1Zra5hSrtHHJe2X6NLpkWyguyZqhpxcQbrUov28iaaiA4pdv5UA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wp5UDuXd; 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="wp5UDuXd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29927C4CEDD; Thu, 27 Mar 2025 16:46:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743093964; bh=qhY4b6FAox5SfM2drkA0wT4l4z1QBGw3fHIsggoYVOs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wp5UDuXdCgTMPJd1WAC86J5QW8E9t6mYgI5ENRz8XZ3jC52wlq/abU3PXcNvBk2WS saCc88aGusjS9c1lejPJ7AYQU8mGNKxHYLnCkXkkTLVbPl9VD/MdcBH/jMLdJ50wF1 o4U/nuu0FIA5B0fxBK3pSxbpSjhvKuS+vJ/hwLRQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52976: efi: fix potential NULL deref in efi_mem_reserve_persistent Date: Thu, 27 Mar 2025 17:43:23 +0100 Message-ID: <2025032704-CVE-2023-52976-eda3@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=2867; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qhY4b6FAox5SfM2drkA0wT4l4z1QBGw3fHIsggoYVOs=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlPGyTmXhc7f3BGxeNGwVfFDBnzjytHy9w9qRT2sEzo9 F6rVx9tO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAitg0Mc3j7pi9gTFzpKeWc 2cXT9Pzn8YuFZxnmO17NtmXLvrPL/kbza8dDma5sMz+ZAwA= 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: efi: fix potential NULL deref in efi_mem_reserve_persistent When iterating on a linked list, a result of memremap is dereferenced without checking it for NULL. This patch adds a check that falls back on allocating a new page in case memremap doesn't succeed. Found by Linux Verification Center (linuxtesting.org) with SVACE. [ardb: return -ENOMEM instead of breaking out of the loop] The Linux kernel CVE team has assigned CVE-2023-52976 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 5.4.232 with commit d92a25627bcdf264183670da73c9a60c0bac327e Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 5.10.168 with commit 87d4ff18738fd71e7e3c10827c80257da6283697 Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 5.15.93 with commit d8fc0b5fb3e816a4a8684bcd3ed02cbef0fce23c Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 6.1.11 with commit a2e6a9ff89f13666a1c3ff7195612ab949ea9afc Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 6.2 with commit 966d47e1f27c45507c5df82b2a2157e5a4fd3909 Issue introduced in 5.1.16 with commit b5961ecad7121fec138ebee7d9eba4863f9dc6e7 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-52976 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/firmware/efi/efi.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/d92a25627bcdf264183670da73c9a60c0bac327e https://git.kernel.org/stable/c/87d4ff18738fd71e7e3c10827c80257da6283697 https://git.kernel.org/stable/c/d8fc0b5fb3e816a4a8684bcd3ed02cbef0fce23c https://git.kernel.org/stable/c/a2e6a9ff89f13666a1c3ff7195612ab949ea9afc https://git.kernel.org/stable/c/966d47e1f27c45507c5df82b2a2157e5a4fd3909