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 682633B7751 for ; Wed, 25 Mar 2026 10:31: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=1774434692; cv=none; b=ecvVBdQxoZsusmLz54jPPy6aUVJZBTtzisBh2CC5ZDp5mN4DqP/I2yKh95f5g34o4dJ6lDUJhLCi4nPoCiFQJj9jeLEiOT+odfUZCwZqaZtlEP7662Viyu3XP3xreJ01cGnAOJbcDufp28hQM88BJ+Eonugx51zVP/8KB3si9nk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434692; c=relaxed/simple; bh=E/ZLRWoACCAMV7UGTpjnbsyt7VIRYYOKHqKGtyRsZGk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fl9eVXw7DlzwQNDGEzbjUI0yM6Zm2010RkUNsvqy7xhAOUWmZgMvgVHKeKGwFaWS9lrOrhZUZKC1wsvK1VplF1VKGFWlNitGZ0Lrql3lgASH1Lz7vNgBPWSaHStGnNpKnqBRWcE+Lazv34FBSQnbWV96efbYzAaa/t1F8tdoeOE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cQjRvcjo; 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="cQjRvcjo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2348C4CEF7; Wed, 25 Mar 2026 10:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774434692; bh=E/ZLRWoACCAMV7UGTpjnbsyt7VIRYYOKHqKGtyRsZGk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=cQjRvcjoMyyhfA5hcIxBUaVI8KddD1iPo6iY+ZijA0i/tlNCsIH/mOaqR6k7UDgzt zBTK/HdVV6wbf5AaqXL5nGHUGoZD+AaTivy3uf6FFVFFgpjlNM6TI7KTNt4svZG7AG LM3I4wyUV8h3KkSLrSiN1wUKEU29kWAk3u09igtI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23352: x86/efi: defer freeing of boot services memory Date: Wed, 25 Mar 2026 11:27:36 +0100 Message-ID: <2026032537-CVE-2026-23352-18f2@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4573; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Id74oIkZuaypUK235yAgu/tOg2R9d6ACPSb0XI8Tz24=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmHd8SuMrJtcTopKvNUKZZphciFfnbPXd7hlhpz2rckb O5N703siGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlMecuw4GzS3B/MX1TF5T/8 +LLo+irmKdxB3xnmJz0t8Slx3bRnlzdP5Prtksm34n6fBAA= 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: x86/efi: defer freeing of boot services memory efi_free_boot_services() frees memory occupied by EFI_BOOT_SERVICES_CODE and EFI_BOOT_SERVICES_DATA using memblock_free_late(). There are two issue with that: memblock_free_late() should be used for memory allocated with memblock_alloc() while the memory reserved with memblock_reserve() should be freed with free_reserved_area(). More acutely, with CONFIG_DEFERRED_STRUCT_PAGE_INIT=y efi_free_boot_services() is called before deferred initialization of the memory map is complete. Benjamin Herrenschmidt reports that this causes a leak of ~140MB of RAM on EC2 t3a.nano instances which only have 512MB or RAM. If the freed memory resides in the areas that memory map for them is still uninitialized, they won't be actually freed because memblock_free_late() calls memblock_free_pages() and the latter skips uninitialized pages. Using free_reserved_area() at this point is also problematic because __free_page() accesses the buddy of the freed page and that again might end up in uninitialized part of the memory map. Delaying the entire efi_free_boot_services() could be problematic because in addition to freeing boot services memory it updates efi.memmap without any synchronization and that's undesirable late in boot when there is concurrency. More robust approach is to only defer freeing of the EFI boot services memory. Split efi_free_boot_services() in two. First efi_unmap_boot_services() collects ranges that should be freed into an array then efi_free_boot_services() later frees them after deferred init is complete. The Linux kernel CVE team has assigned CVE-2026-23352 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.39.1 with commit 0aed459e8487eb6ebdb4efe8cefe1eafbc704b30 and fixed in 2.6.39.2 with commit 4a2cb90c538f06c873a187aa743575d48685d7a6 Issue introduced in 3.0 with commit 916f676f8dc016103f983c7ec54c18ecdbb6e349 and fixed in 6.1.167 with commit 227688312fece0026fc67a00ba9a0b3611ebe95d Issue introduced in 3.0 with commit 916f676f8dc016103f983c7ec54c18ecdbb6e349 and fixed in 6.6.130 with commit 6a25e25279282c5c8ade554c04c6ab9dc7902c64 Issue introduced in 3.0 with commit 916f676f8dc016103f983c7ec54c18ecdbb6e349 and fixed in 6.12.77 with commit 399da820ecfe6f4f10c143e5c453d3559a04db9c Issue introduced in 3.0 with commit 916f676f8dc016103f983c7ec54c18ecdbb6e349 and fixed in 6.18.17 with commit f9e9cc320854a76a39e7bc92d144554f3a727fad Issue introduced in 3.0 with commit 916f676f8dc016103f983c7ec54c18ecdbb6e349 and fixed in 6.19.7 with commit 7dcf59422a3b0d20ddda844f856b4a1e0608a326 Issue introduced in 3.0 with commit 916f676f8dc016103f983c7ec54c18ecdbb6e349 and fixed in 7.0-rc3 with commit a4b0bf6a40f3c107c67a24fbc614510ef5719980 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-2026-23352 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/include/asm/efi.h arch/x86/platform/efi/efi.c arch/x86/platform/efi/quirks.c drivers/firmware/efi/mokvar-table.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/4a2cb90c538f06c873a187aa743575d48685d7a6 https://git.kernel.org/stable/c/227688312fece0026fc67a00ba9a0b3611ebe95d https://git.kernel.org/stable/c/6a25e25279282c5c8ade554c04c6ab9dc7902c64 https://git.kernel.org/stable/c/399da820ecfe6f4f10c143e5c453d3559a04db9c https://git.kernel.org/stable/c/f9e9cc320854a76a39e7bc92d144554f3a727fad https://git.kernel.org/stable/c/7dcf59422a3b0d20ddda844f856b4a1e0608a326 https://git.kernel.org/stable/c/a4b0bf6a40f3c107c67a24fbc614510ef5719980