Security Vulnerability Report
中文
CVE-2026-23352 CVSS 5.5 MEDIUM

CVE-2026-23352

Published: 2026-03-25 11:16:34
Last Modified: 2026-04-24 17:59:40
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

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.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel (多个稳定版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC for CVE-2026-23352 (Memory Leak Impact Verification) * This code checks the system's available memory to demonstrate the leak. * The vulnerability is triggered during the kernel boot process. */ #include <stdio.h> #include <stdlib.h> #include <string.h> void analyze_memory() { FILE *fp; char line[256]; unsigned long mem_total = 0, mem_available = 0; fp = fopen("/proc/meminfo", "r"); if (fp == NULL) { perror("Failed to open /proc/meminfo"); return; } while (fgets(line, sizeof(line), fp)) { if (strstr(line, "MemTotal:")) sscanf(line, "MemTotal: %lu kB", &mem_total); if (strstr(line, "MemAvailable:")) sscanf(line, "MemAvailable: %lu kB", &mem_available); } fclose(fp); printf("[+] Memory Analysis:\n"); printf(" Total Memory: %lu MB\n", mem_total / 1024); printf(" Available Memory: %lu MB\n", mem_available / 1024); // On affected small instances (e.g., 512MB RAM), losing ~140MB is significant if (mem_total > 0 && (mem_total - mem_available) > (100 * 1024)) { printf("[!] Alert: Significant memory gap detected. Possible CVE-2026-23352 leak.\n"); } } int main() { analyze_memory(); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23352", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-03-25T11:16:33.627", "lastModified": "2026-04-24T17:59:40.347", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nx86/efi: aplazar la liberación de la memoria de servicios de arranque\n\nefi_free_boot_services() libera la memoria ocupada por EFI_BOOT_SERVICES_CODE y EFI_BOOT_SERVICES_DATA usando memblock_free_late().\n\nHay dos problemas con eso: memblock_free_late() debería usarse para la memoria asignada con memblock_alloc() mientras que la memoria reservada con memblock_reserve() debería liberarse con free_reserved_area().\n\nMás agudamente, con CONFIG_DEFERRED_STRUCT_PAGE_INIT=y efi_free_boot_services() se llama antes de que se complete la inicialización diferida del mapa de memoria.\n\nBenjamin Herrenschmidt informa que esto causa una fuga de ~140MB de RAM en instancias EC2 t3a.nano que solo tienen 512MB de RAM.\n\nSi la memoria liberada reside en las áreas cuyo mapa de memoria aún no está inicializado, no se liberarán realmente porque memblock_free_late() llama a memblock_free_pages() y esta última omite las páginas no inicializadas.\n\nUsar free_reserved_area() en este punto también es problemático porque __free_page() accede al 'buddy' de la página liberada y eso de nuevo podría terminar en una parte no inicializada del mapa de memoria.\n\nRetrasar todo efi_free_boot_services() podría ser problemático porque además de liberar la memoria de servicios de arranque, actualiza efi.memmap sin ninguna sincronización y eso es indeseable tarde en el arranque cuando hay concurrencia.\n\nUn enfoque más robusto es aplazar solo la liberación de la memoria de servicios de arranque EFI.\n\nDividir efi_free_boot_services() en dos. Primero, efi_unmap_boot_services() recopila los rangos que deberían liberarse en un array, luego efi_free_boot_services() los libera más tarde una vez que la inicialización diferida está completa."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-401"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.0.1", "versionEndExcluding": "5.10.253", "matchCriteriaId": "D9DAAC1B-DEB7-46CC-B206-48044C143468"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.11", "versionEndExcluding": "5.15.203", "matchCriteriaId": "20DDB3E9-AABF-4107-ADB0-5362AA067045"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16 ... (truncated)