CVE-2024-42140

riscv: kexec: Avoid deadlock in kexec crash path

No CVSS score yet EPSS 0.20%

Published 30 Jul 2024 Updated 23 May 2026 CNA: Linux

Check your servers for CVE-2024-42140

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-42140 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 10.2% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 12f237200c169a8667cf9dca7a40df8d7917b9fd, before bb80a7911218bbab2a69b5db7d2545643ab0073d
affected from b17d19a5314a37f7197afd1a0200affd21a7227d, before 653deee48a4682ea17a05b96fb6842795ab5943c
affected from b17d19a5314a37f7197afd1a0200affd21a7227d, before 7692c9b6baacdee378435f58f19baf0eb69e4155
affected from b17d19a5314a37f7197afd1a0200affd21a7227d, before 484dd545271d02d1571e1c6b62ea7df9dbe5e692
affected from b17d19a5314a37f7197afd1a0200affd21a7227d, before c562ba719df570c986caf0941fea2449150bcbc4
affected 7594956fec8902dfc18150bf1dca0940cd4ad025
affected from 5.15.82, before 5.15.163
affected from 6.0.12, before 6.1
Other versions: unaffected
Linux
affected 6.1
unaffected before 6.1
unaffected from 5.15.163 up to and including 5.15.*
unaffected from 6.1.98 up to and including 6.1.*
unaffected from 6.6.39 up to and including 6.6.*
unaffected from 6.9.9 up to and including 6.9.*
unaffected 6.10 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-42140 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-42140

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-42140
trivy image --scanners vuln IMAGE | grep CVE-2024-42140

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-42140 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.