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 F40AE175BC for ; Tue, 2 Apr 2024 07:02:34 +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=1712041355; cv=none; b=uuZ0CURDjp+cs5/KMcAycYN5D+RICC1XYt8mZqvQ01iGuDiLzf3NcS2BKPq6lDD8JDdz8cCIlSe6kJtfrSnVW3vlh/Unu73gx25HGdzW4ePEI0xcT43uNPoZ3F2/sIy2gG9667Fxxu9/rhwWWljNpD5riRwIjXGApnWEJoG2Qso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712041355; c=relaxed/simple; bh=BXGOW1KfdGAsXHdDbKpXk2lEiZt/LrhV3wLp7odtFiY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bsTJmG/uBkNzKTWPfrYojOzknNcF+4qs+bbImQHmsQf+zxsveZOSbHlOJ0MAWsm0ovATHecfitVaY1HWIASbXLe2S6x8L8oaXdcTq+kmNlyw31lDH9chUqzZcUnnSd1lM9xGiRMiIBQM9LcCODF7WHgI3RVxEdxmCI1INbDjbPE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v0KXJAHw; 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="v0KXJAHw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60EF8C433F1; Tue, 2 Apr 2024 07:02:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712041354; bh=BXGOW1KfdGAsXHdDbKpXk2lEiZt/LrhV3wLp7odtFiY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=v0KXJAHw91luC6PXbY/Ed55vkAHvsnYGhOh5EQA4Q82PThn6sPOBkhqo9xtObou9D wmXNj9xht+4qy4XL+az0qIleWcWIk+rkGCqUHW47rh6YAWytMtrkNNkoCZ65bqB6b0 cdn0leNOXZBgvgSvOLTGIXFJXd2i9eP6PDnPydYg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26678: x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section Date: Tue, 2 Apr 2024 09:01:55 +0200 Message-ID: <2024040253-CVE-2024-26678-2cf0@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=2715; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BXGOW1KfdGAsXHdDbKpXk2lEiZt/LrhV3wLp7odtFiY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGncaxP/fVcK01RateeKg0ToP6OG6LppPFaM69b6tiS1Z T19vONjRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEOYZhwZEqjqNTWmQiJ/kG pK/mmfw1itNyEsM8o/837ptwqZ+YKOH21bBjzYXMpw37AQ== 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: x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section The .compat section is a dummy PE section that contains the address of the 32-bit entrypoint of the 64-bit kernel image if it is bootable from 32-bit firmware (i.e., CONFIG_EFI_MIXED=y) This section is only 8 bytes in size and is only referenced from the loader, and so it is placed at the end of the memory view of the image, to avoid the need for padding it to 4k, which is required for sections appearing in the middle of the image. Unfortunately, this violates the PE/COFF spec, and even if most EFI loaders will work correctly (including the Tianocore reference implementation), PE loaders do exist that reject such images, on the basis that both the file and memory views of the file contents should be described by the section headers in a monotonically increasing manner without leaving any gaps. So reorganize the sections to avoid this issue. This results in a slight padding overhead (< 4k) which can be avoided if desired by disabling CONFIG_EFI_MIXED (which is only needed in rare cases these days) The Linux kernel CVE team has assigned CVE-2024-26678 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 3e3eabe26dc8 and fixed in 6.7.5 with commit 4adeeff8c123 Issue introduced in 6.7 with commit 3e3eabe26dc8 and fixed in 6.8 with commit 1ad55cecf22f 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-26678 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: arch/x86/boot/header.S arch/x86/boot/setup.ld 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/4adeeff8c12321cd453412a659c3c0eeb9bb2397 https://git.kernel.org/stable/c/1ad55cecf22f05f1c884adf63cc09d3c3e609ebf