CVE-2024-38667

riscv: prevent pt_regs corruption for secondary idle threads

HIGH
7.8
CVSS Score
Published: June 24, 2024 at 01:52 PM UTC
Updated: June 17, 2026 at 07:40 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: riscv: prevent pt_regs corruption for secondary idle threads Top of the kernel thread stack should be reserved for pt_regs. However this is not the case for the idle threads of the secondary boot harts. Their stacks overlap with their pt_regs, so both may get corrupted. Similar issue has been fixed for the primary hart, see c7cdd96eca28 ("riscv: prevent stack corruption by reserving task_pt_regs(p) early"). However that fix was not propagated to the secondary harts. The problem has been noticed in some CPU hotplug tests with V enabled. The function smp_callin stored several registers on stack, corrupting top of pt_regs structure including status field. As a result, kernel attempted to save or restore inexistent V context.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.7 ≤ v < 6.1.935.7 ≤ v < 6.105.7 ≤ v < 6.6.335.7 ≤ v < 6.9.46.2 ≤ v < 6.6.336.7 ≤ v < 6.9.42875fe0561569f82d0e63658ccf0d11ce7da89226.10 rc1
Vendor states this is fixed in 0c1f28c32a194303da630fca89481334b9547b80 (fixed)
Vendor states this is fixed in 3090c06d50eaa91317f84bf3eac4c265e6cb8d44 (fixed)
Vendor states this is fixed in a638b0461b58aa3205cd9d5f14d6f703d795b4af (fixed)
Vendor states this is fixed in ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e (fixed)
Vendor states this is fixed in 5.7 (unaffected)
Vendor states this is fixed in 6.1.93 (unaffected)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.6.33 (unaffected)
Vendor states this is fixed in 6.9.4 (unaffected)

References (4)

Mailing ListPatch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0c1f28c32a194303da630fca89481334b9547b80
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3090c06d50eaa91317f84bf3eac4c265e6cb8d44
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a638b0461b58aa3205cd9d5f14d6f703d795b4af
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card