x86/kexec: Push kjump return address even for non-kjump kexec
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.337.0.107.1In the Linux kernel, the following vulnerability has been resolved:
x86/kexec: Push kjump return address even for non-kjump kexec
The version of purgatory code shipped by kexec-tools attempts to look above the top of its stack to find a return address for a kjump, even in a non-kjump kexec.
After the commit in Fixes: the word above the stack might not be there, leading to a fault (which is at least now caught by my exception-handling code in kexec).
That commit fixed things for the actual kjump path, but no longer "gratuitously" pushes the unused return address to the stack in the non-kjump path. Put that *back* in the non-kjump path, to prevent purgatory from crashing when trying to access it.
From the CVE record · Linux
The Linux kernel’s x86/kexec non-kjump path may leave no return address above the stack for kexec-tools purgatory code to read, causing a fault during kexec. The input does not describe an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels that use x86/kexec should check their deployments; affected versions are not specified.