CVE-2026-99594 in Linux
Summary
by MITRE • 11/20/2026
In the Linux kernel, the following vulnerability has been resolved:
arm64: kexec_file: Fix elf_headers memory leak in retry loop
A retry allocates new elf headers and overwrites image->elf_headers, leaking the previous buffer.
Free it before assigning.
[[email protected]: drop the redundant NULL check before vfree()]
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel vulnerability identified as an arm64 kexec_file memory leak represents a classic resource management error within the system's boot mechanism. The issue resides in the handling of ELF headers during the execution of the kexec syscall, specifically when the operation requires retrying due to dynamic allocation constraints or other transient failures. In this specific code path, the kernel attempts to allocate new memory for elf_headers and assigns it to image->elf_headers. However, if a previous buffer was already allocated and assigned to that pointer, overwriting it without first releasing the old memory results in a direct leak of kernel heap space. This flaw is particularly concerning because kexec operations are often invoked during critical system transitions or emergency reboots, where resource integrity is paramount for maintaining system stability.
From a technical perspective, this vulnerability falls under CWE-401, which describes missing release of memory after effective allocation. The root cause is the failure to call vfree on the previously allocated buffer before assigning the new pointer value. This oversight means that every time the retry loop executes and allocates fresh headers while discarding the reference to the old ones, a chunk of kernel virtual memory becomes unreachable by the garbage collector or manual deallocation routines. Over repeated executions or in scenarios where kexec is triggered frequently, this can lead to gradual depletion of available kernel memory resources. The inclusion of dropping redundant NULL checks before vfree indicates that the fix also involved code cleanup to ensure robustness against null pointer dereferences, although the primary security impact remains the prevention of resource exhaustion through proper deallocation protocols.
The operational impact of this vulnerability is primarily related to Denial of Service conditions caused by memory pressure rather than direct privilege escalation or data exfiltration. An attacker with local access who can trigger kexec operations repeatedly could theoretically exhaust kernel memory, leading to system instability, crashes, or the inability to perform further critical system calls that require heap allocation. While the immediate threat level may be considered moderate due to the specific nature of the affected subsystem and the typical privileges required to invoke kexec, such leaks contribute to long-term reliability issues in production environments where continuous uptime is essential. The lack of proper cleanup also complicates debugging efforts as memory usage patterns become increasingly erratic over time.
Mitigation strategies for this vulnerability involve applying the upstream kernel patch that explicitly frees the old elf_headers buffer before reassigning it with new allocations. System administrators should ensure their systems are updated to a version of the Linux kernel where this fix is integrated, typically found in stable releases following the commit by Catalin Marinas and related contributors. For environments running older kernels without immediate access to updates, monitoring for unusual memory consumption patterns during kexec operations can serve as an indirect detection method. Furthermore, adhering to secure coding practices that mandate checking return values of allocation functions and ensuring corresponding deallocation paths are always executed is critical in preventing similar issues in other parts of the kernel or third-party modules. This incident underscores the importance of rigorous code review processes for memory management logic within high-frequency execution paths like boot sequences.