# CVE-2024-42140: riscv: kexec: Avoid deadlock in kexec crash path

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2024-07-30T07:46:34.260Z
- Modified: 2026-06-17T07:48:54.967Z
- Weaknesses: CWE-667
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 12f237200c169a8667cf9dca7a40df8d7917b9fd before bb80a7911218bbab2a69b5db7d2545643ab0073d; from b17d19a5314a37f7197afd1a0200affd21a7227d before 653deee48a4682ea17a05b96fb6842795ab5943c; from b17d19a5314a37f7197afd1a0200affd21a7227d before 7692c9b6baacdee378435f58f19baf0eb69e4155; from b17d19a5314a37f7197afd1a0200affd21a7227d before 484dd545271d02d1571e1c6b62ea7df9dbe5e692; from b17d19a5314a37f7197afd1a0200affd21a7227d before c562ba719df570c986caf0941fea2449150bcbc4; 7594956fec8902dfc18150bf1dca0940cd4ad025; from 5.15.82 before 5.15.163; from 6.0.12 before 6.1; 6.1 (not affected: before 6.1; from 5.15.163 up to 5.15.*; from 6.1.98 up to 6.1.*; from 6.6.39 up to 6.6.*; from 6.9.9 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 5.15.82 before 5.15.163; from 6.0.12 before 6.1.98; from 6.2 before 6.6.39; from 6.7 before 6.9.9

## References

- <https://git.kernel.org/stable/c/bb80a7911218bbab2a69b5db7d2545643ab0073d> (mailing-list, patch)
- <https://git.kernel.org/stable/c/653deee48a4682ea17a05b96fb6842795ab5943c> (mailing-list, patch)
- <https://git.kernel.org/stable/c/7692c9b6baacdee378435f58f19baf0eb69e4155> (mailing-list, patch)
- <https://git.kernel.org/stable/c/484dd545271d02d1571e1c6b62ea7df9dbe5e692> (mailing-list, patch)
- <https://git.kernel.org/stable/c/c562ba719df570c986caf0941fea2449150bcbc4> (mailing-list, patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-42140](https://www.cve.org/CVERecord?id=CVE-2024-42140), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2024-42140](https://nvd.nist.gov/vuln/detail/CVE-2024-42140), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-42140 · Whole record: https://cve.day/CVE-2024-42140.json · Rebuilt by cve.day 2026-11-25T22:58:43.414Z
