CVE-2026-99593: arm64: sdei: Preserve the interrupted context's exception registers
In the Linux kernel, the following vulnerability has been resolved:
arm64: sdei: Preserve the interrupted context's exception registers
An SDEI event is dispatched by firmware regardless of PSTATE.DAIF, so it can interrupt the kernel where the exception registers are live:
- exception entry, before kernelentry has saved ELREL1/SPSREL1 and before the C handler has read ESREL1/FAREL1; - exception return, after kernelexit has loaded ELREL1/SPSREL1 and before the ERET.
An IRQ or pseudo-NMI cannot arrive there with PSTATE.I set. Firmware saves only x0-x17, PC and PSTATE around an SDEI event, so a synchronous exception taken by the handler overwrites the interrupted context's ELR, SPSR, ESR and FAR. dosdeievent() only notices that ELR changed, and warns.
The interrupted context then carries on with the handler's state. A task interrupted on its way into the kernel can be sent SIGILL for the handler's kernel data abort. A task interrupted on its way back to user space ERETs to EL1, at the handler's fixup address, with user registers loaded.
With SDEI delivering NMI backtraces, this happens in normal operation. The handler runs showregs(), which reads through possibly-NULL pointers with the nofault() accessors. printworkerinfo() faults this way for a kworker that is not running a work item, and a single sysrq-l warned once per such kworker.
Save ELR, SPSR, ESR and FAR in sdeihandler() before irqentrynmienter(), which can take an exception too, and restore them after irqentrynmiexit().
Once they are restored, a nested exception is harmless if its handler is safe in NMI context. That holds for EL1 data aborts on translation, permission and access-flag faults, which never take the mmap lock in NMI context, and for BRK. Warn once, with the syndrome, about any other exception class.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Compensating control
In arm64 SDEI __sdei_handler(), save ELR_EL1, SPSR_EL1, ESR_EL1, and FAR_EL1 before irqentry_nmi_enter(), then restore them after irqentry_nmi_exit() to preserve the interrupted context’s exception registers.
Frequently Asked Questions
Do interrupt masks protect against this condition?
No. Firmware can dispatch an SDEI event regardless of PSTATE.DAIF, including while normal IRQ or pseudo-NMI delivery would be blocked by PSTATE.I.
When is the affected state most likely to be interrupted?
The vulnerable windows are during exception entry before ELR_EL1 and SPSR_EL1 are saved or ESR_EL1 and FAR_EL1 are read, and during exception return after ELR_EL1 and SPSR_EL1 have been loaded but before ERET. SDEI delivery for NMI backtraces can reach these windows during normal operation.
What symptoms can indicate that an interrupted context was corrupted?
A task interrupted while entering the kernel can receive SIGILL due to the handler's kernel data abort. A task interrupted while returning to user space can ERET to EL1 at the handler's fixup address with user registers loaded.
Is there any runtime indication in the existing handler?
do_sdei_event() notices and warns when ELR changes. It does not detect the full corruption of ELR, SPSR, ESR, and FAR, so the warning is not a complete safeguard.