CVE-2024-38613m68k: Fix spinlock race in kernel thread creation
- 4.7MediumCVSS base score
- 0.18%Exploitation in 30 daysEPSS · top 92% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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).
Timeline
ID reserved
By Linux
- 1 day later
· 1 day later
Published
- 23 months later
· 23 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Analyzed | 3.1 | Medium4.7 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 0.18% · top 92% of all CVEs (17 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.7.
Affected products
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < 2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < 5213cc01d0464c011fdc09f318705603ed3a746b
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < 4eeffecc8e3cce25bb559502c2fd94a948bcde82
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < 77b2b67a0f8bce260c53907e5749d61466d90c87
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < 0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < f3baf0f4f92af32943ebf27b960e0552c6c082fd
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < f1d4274a84c069be0f6098ab10c3443fc1f7134c
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < 95f00caf767b5968c2c51083957b38be4748a78a
- affected 533e6903bea0440816a0f517b0845ccea4cc7917 – < da89ce46f02470ef08f0f580755d14d547da59ed
- affected 3.7
- unaffected < 3.7
- unaffected 4.19.316 – ≤ 4.19.*
- unaffected 5.4.278 – ≤ 5.4.*
- unaffected 5.10.219 – ≤ 5.10.*
- unaffected 5.15.161 – ≤ 5.15.*
- unaffected 6.1.93 – ≤ 6.1.*
- unaffected 6.6.33 – ≤ 6.6.*
- unaffected 6.8.12 – ≤ 6.8.*
- unaffected 6.9.3 – ≤ 6.9.*
- unaffected 6.10 – ≤ *
References
References9
- https://git.kernel.org/stable/c/2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14 (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/5213cc01d0464c011fdc09f318705603ed3a746b (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/4eeffecc8e3cce25bb559502c2fd94a948bcde82 (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/77b2b67a0f8bce260c53907e5749d61466d90c87 (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0 (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/f3baf0f4f92af32943ebf27b960e0552c6c082fd (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/f1d4274a84c069be0f6098ab10c3443fc1f7134c (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/95f00caf767b5968c2c51083957b38be4748a78a (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/da89ce46f02470ef08f0f580755d14d547da59ed (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-37476 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-38613)Record last updated .