x86/kexec: Fix double-free of elf header buffer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
115ee42a4c2f26ba2b4ace2668a3f004621f6833| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
x86/kexec: Fix double-free of elf header buffer
After
b3e34a47f989 ("x86/kexec: fix memory leak of elf header buffer"),
freeing image->elf_headers in the error path of crash_load_segments() is not needed because kimage_file_post_load_cleanup() will take care of that later. And not clearing it could result in a double-free.
Drop the superfluous vfree() call at the error path of crash_load_segments().
From the CVE record · Linux
The Linux kernel's x86/kexec crash_load_segments() error path can free an ELF header buffer that is freed again during cleanup. The input does not establish whether an attacker can trigger this, or specify network or local access, authentication, or user-interaction requirements.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.