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 957DB1E7677 for ; Mon, 21 Oct 2024 12:27:32 +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=1729513652; cv=none; b=HpDXcuC4ff9KyD819osIt6iobocGSd+bGbe2xZtmAMHiq6ge0xuH2lSv4Db5Wb84NjnMwq5/wdcIIU7kgYAF2UYyyX2AvwmleO5rIHq4Fj4AEJhWvM8LRunMOmz4hjdlF23NoNAk7pX+j/6NiP3YHVFACuq1fP7eKRDYKkxLCQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729513652; c=relaxed/simple; bh=IvrfgIznn6pybPfFTzuZKxth/OSp5sPJzm+JBSdo9Y8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rDdYMLD7txKMU+tpIy5GqD6aQFb144GqwiNPE9fBKh65alE0aEzKGCfQOnsAzM4uiAxEhVmq+PQkkP4S+grxoA/Ycczr7eFYcSqfvbWMpi6XCGojxgz67wU87r38aC2iR6SvpCnrAjMxxji8vOyr5OWdrW6B/hDjLWHYHfj2wnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZS7WF/UH; 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="ZS7WF/UH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF056C4CEE4; Mon, 21 Oct 2024 12:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729513652; bh=IvrfgIznn6pybPfFTzuZKxth/OSp5sPJzm+JBSdo9Y8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ZS7WF/UHE44jHlpCWIxy2dqK3ZBJR70B3yESVrfYcX53IZZJZ27bKFxWuOlkqYMAK Va7G1YtEeqf2jHpaVOAExOEpHCKon881draNTOi7Cj4o33rrTGvAWPCVvoZUQtqk5x 708aOIUl50vQhBNab4Et2OMnLysrrf88PwWq9zys= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49858: efistub/tpm: Use ACPI reclaim memory for event log to avoid corruption Date: Mon, 21 Oct 2024 14:27:24 +0200 Message-ID: <2024102123-CVE-2024-49858-b7c4@gregkh> X-Mailer: git-send-email 2.47.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=2924; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IvrfgIznn6pybPfFTzuZKxth/OSp5sPJzm+JBSdo9Y8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliHquzIzlkmY4teLZNO/zpo/VGM8vbmfif3Os59Lhqg tj9jIV7O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAijcEMC3b//2w75WipmYjx 9SMGOhMb2uTVtBkWnHTdeWnfz4RnHZ13eq5FSF3vfLDiJQA= 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: efistub/tpm: Use ACPI reclaim memory for event log to avoid corruption The TPM event log table is a Linux specific construct, where the data produced by the GetEventLog() boot service is cached in memory, and passed on to the OS using an EFI configuration table. The use of EFI_LOADER_DATA here results in the region being left unreserved in the E820 memory map constructed by the EFI stub, and this is the memory description that is passed on to the incoming kernel by kexec, which is therefore unaware that the region should be reserved. Even though the utility of the TPM2 event log after a kexec is questionable, any corruption might send the parsing code off into the weeds and crash the kernel. So let's use EFI_ACPI_RECLAIM_MEMORY instead, which is always treated as reserved by the E820 conversion logic. The Linux kernel CVE team has assigned CVE-2024-49858 to this issue. Affected and fixed versions =========================== Fixed in 5.10.227 with commit f76b69ab9cf0 Fixed in 5.15.168 with commit 11690d7e7684 Fixed in 6.1.113 with commit 5b22c038fb27 Fixed in 6.6.54 with commit 19fd2f2c5fb3 Fixed in 6.10.13 with commit 38d9b07d99b7 Fixed in 6.11.2 with commit 2e6871a632a9 Fixed in 6.12-rc1 with commit 77d48d39e991 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-49858 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/libstub/tpm.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/f76b69ab9cf04358266e3cea5748c0c2791fbb08 https://git.kernel.org/stable/c/11690d7e76842f29b60fbb5b35bc97d206ea0e83 https://git.kernel.org/stable/c/5b22c038fb2757c652642933de5664da471f8cb7 https://git.kernel.org/stable/c/19fd2f2c5fb36b61506d3208474bfd8fdf1cada3 https://git.kernel.org/stable/c/38d9b07d99b789efb6d8dda21f1aaad636c38993 https://git.kernel.org/stable/c/2e6871a632a99d9b9e2ce3a7847acabe99e5a26e https://git.kernel.org/stable/c/77d48d39e99170b528e4f2e9fc5d1d64cdedd386