CVE-2024-38613
m68k: Fix spinlock race in kernel thread creation
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 5213cc01d0464c011fdc09f318705603ed3a746b; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 4eeffecc8e3cce25bb559502c2fd94a948bcde82; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 77b2b67a0f8bce260c53907e5749d61466d90c87; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f3baf0f4f92af32943ebf27b960e0552c6c082fd; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f1d4274a84c069be0f6098ab10c3443fc1f7134c; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 95f00caf767b5968c2c51083957b38be4748a78a; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < da89ce46f02470ef08f0f580755d14d547da59ed
- Anyone running Linux 3.7
Vulnerability facts
- Affected
- Linux >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 5213cc01d0464c011fdc09f318705603ed3a746b; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 4eeffecc8e3cce25bb559502c2fd94a948bcde82; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 77b2b67a0f8bce260c53907e5749d61466d90c87; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f3baf0f4f92af32943ebf27b960e0552c6c082fd; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f1d4274a84c069be0f6098ab10c3443fc1f7134c; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 95f00caf767b5968c2c51083957b38be4748a78a; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < da89ce46f02470ef08f0f580755d14d547da59ed; Linux 3.7
- Fixed in
- Linux 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14, Linux 5213cc01d0464c011fdc09f318705603ed3a746b, Linux 4eeffecc8e3cce25bb559502c2fd94a948bcde82, Linux 77b2b67a0f8bce260c53907e5749d61466d90c87, Linux 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0, Linux 95f00caf767b5968c2c51083957b38be4748a78a
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 4.7 (v3.1, NVD)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.22% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- CWE
- CWE-362
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: m68k: Fix spinlock race in kernel thread creation Context switching does take care to retain the correct lock owner across the switch from 'prev' to 'next' tasks. This does rely on interrupts remaining disabled for the entire duration of the switch. This condition is guaranteed for normal process creation and context switching between already running processes, because both 'prev' and 'next' already have interrupts disabled in their saved copies of the status register. The situation is different for newly created kernel threads. The status register is set to PS_S in copy_thread(), which does leave the IPL at 0. Upon restoring the 'next' thread's status register in switch_to() aka resume(), interrupts then become enabled prematurely. resume() then returns via ret_from_kernel_thread() and schedule_tail() where run queue lock is released (see finish_task_switch() and finish_lock_switch()). A timer interrupt calling scheduler_tick() before the lock is released in finish_task_switch() will find the lock already taken, with the current task as lock owner. This causes a spinlock recursion warning as reported by Guenter Roeck. As far as I can ascertain, this race has been opened in commit 533e6903bea0 ("m68k: split ret_from_fork(), simplify kernel_thread()") but I haven't done a detailed study of kernel history so it may well predate that commit. Interrupts cannot be disabled in the saved status register copy for kernel threads (init will complain about interrupts disabled when finally starting user space). Disable interrupts temporarily when switching the tasks' register sets in resume(). Note that a simple oriw 0x700,%sr after restoring sr is not enough here - this leaves enough of a race for the 'spinlock recursion' warning to still be observed. Tested on ARAnyM and qemu (Quadra 800 emulation).
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 5213cc01d0464c011fdc09f318705603ed3a746b; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 4eeffecc8e3cce25bb559502c2fd94a948bcde82; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 77b2b67a0f8bce260c53907e5749d61466d90c87; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f3baf0f4f92af32943ebf27b960e0552c6c082fd; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f1d4274a84c069be0f6098ab10c3443fc1f7134c; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 95f00caf767b5968c2c51083957b38be4748a78a; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < da89ce46f02470ef08f0f580755d14d547da59ed | — | cvelist |
| Linux | 3.7 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-38613. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-38613.md Affected: Linux >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 5213cc01d0464c011fdc09f318705603ed3a746b; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 4eeffecc8e3cce25bb559502c2fd94a948bcde82; >= 533e6903bea0440816a0f51… Fixed in: Linux 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14, Linux 5213cc01d0464c011fdc09f318705603ed3a746b, Linux 4eeffecc8e3cce25bb559502c2fd94a948bcde82, Linux 77b2b67a0f8bce260c53907e5749d61466d90c87, Linux 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0, Linux 95f00caf767b5968c2c51083957b38be4748a78a Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14
- https://git.kernel.org/stable/c/5213cc01d0464c011fdc09f318705603ed3a746b
- https://git.kernel.org/stable/c/4eeffecc8e3cce25bb559502c2fd94a948bcde82
- https://git.kernel.org/stable/c/77b2b67a0f8bce260c53907e5749d61466d90c87
- https://git.kernel.org/stable/c/0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0
- https://git.kernel.org/stable/c/f3baf0f4f92af32943ebf27b960e0552c6c082fd
- https://git.kernel.org/stable/c/f1d4274a84c069be0f6098ab10c3443fc1f7134c
- https://git.kernel.org/stable/c/95f00caf767b5968c2c51083957b38be4748a78a
- https://git.kernel.org/stable/c/da89ce46f02470ef08f0f580755d14d547da59ed
FAQ
Is CVE-2024-38613 being exploited?
There is no confirmed exploitation: CVE-2024-38613 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-38613?
Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2024-38613?
Linux >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 5213cc01d0464c011fdc09f318705603ed3a746b; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 4eeffecc8e3cce25bb559502c2fd94a948bcde82; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 77b2b67a0f8bce260c53907e5749d61466d90c87; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f3baf0f4f92af32943ebf27b960e0552c6c082fd; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < f1d4274a84c069be0f6098ab10c3443fc1f7134c; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < 95f00caf767b5968c2c51083957b38be4748a78a; >= 533e6903bea0440816a0f517b0845ccea4cc7917, < da89ce46f02470ef08f0f580755d14d547da59ed; Linux 3.7.
Is there a fix for CVE-2024-38613?
Yes. Fixed in Linux 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14, Linux 5213cc01d0464c011fdc09f318705603ed3a746b, Linux 4eeffecc8e3cce25bb559502c2fd94a948bcde82, Linux 77b2b67a0f8bce260c53907e5749d61466d90c87, Linux 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0, Linux 95f00caf767b5968c2c51083957b38be4748a78a. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2024-38613?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.