Author: Borislav Petkov (AMD) <[email protected]>
Date: Tue Jun 2 21:26:44 2026 -0700
x86/bugs: Make Safe-RET robust against interrupt injection
commit 7e7f81cf6f5ca3311e526308f55d7c54d3ba71f9 upstream.
An attacker injecting interrupts while the Safe-RET mitigation executes
on machines affected by SRSO can neutralize the safe return sequence,
potentially leading to data leakage through speculative execution.
Fixup register state as if the Safe-RET sequence executed successfully
by "emulating" it, in a manner of speaking, and avoid executing a RET
instruction after returning from the interrupt.
Co-developed-by: David Kaplan <[email protected]>
Signed-off-by: David Kaplan <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>