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 5FDB41E04A6 for ; Thu, 7 Nov 2024 09:35:42 +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=1730972142; cv=none; b=sIzjMJhJPbmlbFF/UHmFxzx3pSUFqmNaZn/fwy9un4SAq9p3WJj0Sbgo3VLm0Q3rC44s9dIZP8vsfW/w2JiqpZ7Hao5YECkpkr6yI4UZ1YH0lmR//Pg7gZGtt7AXPDXwolveCUy5uun7gi/pAhpC0K62RlW5eSSeY04biV8vjgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730972142; c=relaxed/simple; bh=npwJFXaGk31Z6IqmL7nSJVr16d0QQB1PsdGRQ6o/eRk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n4wyrCRV8/EcK5JqjCTrU4cKDMbuWAd5q2i2NWYPFSqi7DA6EYS36qYeBZCzK9qX5oSx3OrXCLkQDUTFxmip2fU6NaN1Ciue5Wl6rpHNn9JAvRSad9Us5EVqxtlhspVPq0b9fF1sKKc3uJ7k1mQzdts913WKI/aGtJl6P+LSvG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JxWjYV79; 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="JxWjYV79" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B98E9C4CED2; Thu, 7 Nov 2024 09:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730972142; bh=npwJFXaGk31Z6IqmL7nSJVr16d0QQB1PsdGRQ6o/eRk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JxWjYV793iTBEUz0IliYMtfCiYPOk115SerI+IJUBIs4EY05RahF9aAOZoKSUlz38 O38ghAl80D9pxdEVmkOPRmHkYNfZQQVrGo2RVZHh25tRzb49fWAv00F1v8u0Wjc2e5 UwE/xoHgJSwQ6W0ZL+BdN7hMqKEZOFl8s/juRNiY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50141: ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context Date: Thu, 7 Nov 2024 10:34:41 +0100 Message-ID: <2024110742-CVE-2024-50141-a773@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=3431; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=npwJFXaGk31Z6IqmL7nSJVr16d0QQB1PsdGRQ6o/eRk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk6nZtjz/FFy+84+eAZBx/zcm0xo0U3HrGWSUyUFvulv lSf5Yh+RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzE6w3Dgt69Dre/VYtseXVT b7uJ8V77rczWBgwLdi5xe3H9bpDPt8NqrU/UUua9CfP5DQA= 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: ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context PRMT needs to find the correct type of block to translate the PA-VA mapping for EFI runtime services. The issue arises because the PRMT is finding a block of type EFI_CONVENTIONAL_MEMORY, which is not appropriate for runtime services as described in Section 2.2.2 (Runtime Services) of the UEFI Specification [1]. Since the PRM handler is a type of runtime service, this causes an exception when the PRM handler is called. [Firmware Bug]: Unable to handle paging request in EFI runtime service WARNING: CPU: 22 PID: 4330 at drivers/firmware/efi/runtime-wrappers.c:341 __efi_queue_work+0x11c/0x170 Call trace: Let PRMT find a block with EFI_MEMORY_RUNTIME for PRM handler and PRM context. If no suitable block is found, a warning message will be printed, but the procedure continues to manage the next PRM handler. However, if the PRM handler is actually called without proper allocation, it would result in a failure during error handling. By using the correct memory types for runtime services, ensure that the PRM handler and the context are properly mapped in the virtual address space during runtime, preventing the paging request error. The issue is really that only memory that has been remapped for runtime by the firmware can be used by the PRM handler, and so the region needs to have the EFI_MEMORY_RUNTIME attribute. [ rjw: Subject and changelog edits ] The Linux kernel CVE team has assigned CVE-2024-50141 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit cefc7ca46235 and fixed in 6.1.115 with commit 8ce081ad8425 Issue introduced in 5.14 with commit cefc7ca46235 and fixed in 6.6.59 with commit 795b080d9aa1 Issue introduced in 5.14 with commit cefc7ca46235 and fixed in 6.11.6 with commit 20e9fafb8bb6 Issue introduced in 5.14 with commit cefc7ca46235 and fixed in 6.12-rc5 with commit 088984c8d54c 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-50141 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/acpi/prmt.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/8ce081ad842510f0e70fa6065a401660eac876d4 https://git.kernel.org/stable/c/795b080d9aa127215a5baf088a22fa09341a0126 https://git.kernel.org/stable/c/20e9fafb8bb6f545667d7916b0e81e68c0748810 https://git.kernel.org/stable/c/088984c8d54c0053fc4ae606981291d741c5924b