CVE-2024-57939 json
riscv: Fix sleeping in invalid context in die()
published 2025-01-21 21 mo ago modified 2026-06-17 4 mo ago also EUVD-2024-53842
- cvss
- 5.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 10%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
riscv: Fix sleeping in invalid context in die()
die() can be called in exception handler, and therefore cannot sleep. However, die() takes spinlock_t which can sleep with PREEMPT_RT enabled. That causes the following warning:
BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 285, name: mutex preempt_count: 110001, expected: 0 RCU nest depth: 0, expected: 0 CPU: 0 UID: 0 PID: 285 Comm: mutex Not tainted 6.12.0-rc7-00022-ge19049cf7d56-dirty #234 Hardware name: riscv-virtio,qemu (DT) Call Trace: dump_backtrace+0x1c/0x24 show_stack+0x2c/0x38 dump_stack_lvl+0x5a/0x72 dump_stack+0x14/0x1c __might_resched+0x130/0x13a rt_spin_lock+0x2a/0x5c die+0x24/0x112 do_trap_insn_illegal+0xa0/0xea _new_vmalloc_restore_context_a0+0xcc/0xd8 Oops - illegal instruction [#1]
Switch to use raw_spinlock_t, which does not sleep even with PREEMPT_RT enabled.
Patch / fix
- Linux Linux 5.10.234, 5.15.177, 6.1.125, 6.6.72, 6.12.10, 6.13
- linux Debian 12 6.1.128-1
- linux Debian 14, Debian 13 6.12.10-1
debian advisories DEBIAN-CVE-2024-57939
- linux Ubuntu 22.04 LTS 5.15.0-135.146
- linux Ubuntu 24.04 LTS 6.8.0-60.63
- linux-aws Ubuntu 22.04 LTS 5.15.0-1080.87
- linux-aws Ubuntu 24.04 LTS 6.8.0-1029.31
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1079.88
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1030.32
- linux-gke Ubuntu 22.04 LTS 5.15.0-1077.83
- linux-gke Ubuntu 24.04 LTS 6.8.0-1025.29
ubuntu advisories UBUNTU-CVE-2024-57939
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/8c38baa03ac8e18140faf36a3b955d30cad48e74 commit
- git.kernel.org/stable/c/10c24df2e303f517fab0359392c11b6b1d553f2b commit
- git.kernel.org/stable/c/c21df31fc2a4afc02a6e56511364e9e793ea92ec commit
- git.kernel.org/stable/c/f48f060a4b36b5e96628f6c3fb1540f1e8dedb69 commit
- git.kernel.org/stable/c/76ab0afcdbe8c9685b589016ee1c0e25fe596707 commit
- git.kernel.org/stable/c/6a97f4118ac07cfdc316433f385dbdc12af5025e commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-57939 updated cvss 5.5
kernel: riscv: Fix sleeping in invalid context in die()
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 13 mo ago
Exploit prediction
0.21% chance of exploitation in the next 30 days, higher than 10% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| CNA | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
-
git.kernel.org
/stable/c/8c38baa03ac8e18140faf36a3b955d30cad48e74
patch
-
git.kernel.org
/stable/c/10c24df2e303f517fab0359392c11b6b1d553f2b
patch
-
git.kernel.org
/stable/c/c21df31fc2a4afc02a6e56511364e9e793ea92ec
patch
-
git.kernel.org
/stable/c/f48f060a4b36b5e96628f6c3fb1540f1e8dedb69
patch
-
git.kernel.org
/stable/c/76ab0afcdbe8c9685b589016ee1c0e25fe596707
patch
-
git.kernel.org
/stable/c/6a97f4118ac07cfdc316433f385dbdc12af5025e
patch
- lists.debian.org /debian-lts-announce/2025/03/msg00001.html
Sources
- CVE List CVE-2024-57939
- NVD CVE-2024-57939
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.