CVE-2024-57939: Linux kernel · riscv: Fix sleeping in invalid context in die()
Source GCVE Database
Not known to be exploited · CVSS 5.5 Medium.
Data as of 30 Oct 2026, 01:01 UTC
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 21 Jan 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
AI-suggested
A fix is available that replaces spinlock_t with raw_spinlock_t in the die() function for RISC-V in the Linux kernel. Users should update to a kernel version that includes this fix. No additional mitigation is required beyond applying the official patch.
Description
CVE-2024-57939 addresses a vulnerability in the Linux kernel's RISC-V architecture code where the die() function could sleep in an invalid context when PREEMPT_RT is enabled. This occurs because die() takes a spinlock_t, which can sleep, but die() can be called from an exception handler where sleeping is not allowed. The issue causes kernel warnings and potential instability. The fix involves switching to raw_spinlock_t, which does not sleep even with PREEMPT_RT enabled.
References
- nvd.nist.gov/vuln/detail/CVE-2024-57939 (opens in a new tab)
- git.kernel.org/stable/c/10c24df2e303f517fab0359392c11b6b1d553f2b (opens in a new tab)
- git.kernel.org/stable/c/6a97f4118ac07cfdc316433f385dbdc12af5025e (opens in a new tab)
- git.kernel.org/stable/c/76ab0afcdbe8c9685b589016ee1c0e25fe596707 (opens in a new tab)
- git.kernel.org/stable/c/8c38baa03ac8e18140faf36a3b955d30cad48e74 (opens in a new tab)
- git.kernel.org/stable/c/c21df31fc2a4afc02a6e56511364e9e793ea92ec (opens in a new tab)
- git.kernel.org/stable/c/f48f060a4b36b5e96628f6c3fb1540f1e8dedb69 (opens in a new tab)
- lists.debian.org/debian-lts-announce/2025/03/msg00001.html (opens in a new tab)