{"id":"CVE-2026-23352","summary":"x86/efi: defer freeing of boot services memory","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/efi: defer freeing of boot services memory\n\nefi_free_boot_services() frees memory occupied by EFI_BOOT_SERVICES_CODE\nand EFI_BOOT_SERVICES_DATA using memblock_free_late().\n\nThere are two issue with that: memblock_free_late() should be used for\nmemory allocated with memblock_alloc() while the memory reserved with\nmemblock_reserve() should be freed with free_reserved_area().\n\nMore acutely, with CONFIG_DEFERRED_STRUCT_PAGE_INIT=y\nefi_free_boot_services() is called before deferred initialization of the\nmemory map is complete.\n\nBenjamin Herrenschmidt reports that this causes a leak of ~140MB of\nRAM on EC2 t3a.nano instances which only have 512MB or RAM.\n\nIf the freed memory resides in the areas that memory map for them is\nstill uninitialized, they won't be actually freed because\nmemblock_free_late() calls memblock_free_pages() and the latter skips\nuninitialized pages.\n\nUsing free_reserved_area() at this point is also problematic because\n__free_page() accesses the buddy of the freed page and that again might\nend up in uninitialized part of the memory map.\n\nDelaying the entire efi_free_boot_services() could be problematic\nbecause in addition to freeing boot services memory it updates\nefi.memmap without any synchronization and that's undesirable late in\nboot when there is concurrency.\n\nMore robust approach is to only defer freeing of the EFI boot services\nmemory.\n\nSplit efi_free_boot_services() in two. First efi_unmap_boot_services()\ncollects ranges that should be freed into an array then\nefi_free_boot_services() later frees them after deferred init is complete.","modified":"2026-04-14T03:47:32.514686Z","published":"2026-03-25T10:27:37.500Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23352.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/227688312fece0026fc67a00ba9a0b3611ebe95d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/399da820ecfe6f4f10c143e5c453d3559a04db9c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4a2cb90c538f06c873a187aa743575d48685d7a6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6a25e25279282c5c8ade554c04c6ab9dc7902c64"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7dcf59422a3b0d20ddda844f856b4a1e0608a326"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a4b0bf6a40f3c107c67a24fbc614510ef5719980"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f9e9cc320854a76a39e7bc92d144554f3a727fad"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23352.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23352"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0aed459e8487eb6ebdb4efe8cefe1eafbc704b30"},{"fixed":"4a2cb90c538f06c873a187aa743575d48685d7a6"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"916f676f8dc016103f983c7ec54c18ecdbb6e349"},{"fixed":"227688312fece0026fc67a00ba9a0b3611ebe95d"},{"fixed":"6a25e25279282c5c8ade554c04c6ab9dc7902c64"},{"fixed":"399da820ecfe6f4f10c143e5c453d3559a04db9c"},{"fixed":"f9e9cc320854a76a39e7bc92d144554f3a727fad"},{"fixed":"7dcf59422a3b0d20ddda844f856b4a1e0608a326"},{"fixed":"a4b0bf6a40f3c107c67a24fbc614510ef5719980"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23352.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.39.2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"2.7.0"},{"fixed":"6.1.167"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"6.6.130"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.12.77"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.18.17"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.19.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23352.json"}}],"schema_version":"1.7.5"}