riscv: kexec: Avoid deadlock in kexec crash path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
7594956fec8902dfc18150bf1dca0940cd4ad025| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
riscv: kexec: Avoid deadlock in kexec crash path
If the kexec crash code is called in the interrupt context, the machine_kexec_mask_interrupts() function will trigger a deadlock while trying to acquire the irqdesc spinlock and then deactivate irqchip in irq_set_irqchip_state() function.
Unlike arm64, riscv only requires irq_eoi handler to complete EOI and keeping irq_set_irqchip_state() will only leave this possible deadlock without any use. So we simply remove it.
From the CVE record · Linux
The RISC-V kexec crash path can deadlock when called in interrupt context while masking interrupts. The input does not establish whether an attacker can trigger this condition or whether access or user interaction is required.
Engineers running the Linux kernel on RISC-V systems should check their deployments; affected versions are not specified.