CVE-2024-38667
JSON

7.8high

riscv: prevent pt_regs corruption for secondary idle threads

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
0.23% (higher than 14% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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

Product or packageVersionsReported by
Linux Linuxfrom 2875fe0561569f82d0e63658ccf0d11ce7da8922 before ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e, from 2875fe0561569f82d0e63658ccf0d11ce7da8922 before 3090c06d50eaa91317f84bf3eac4c265e6cb8d44, from 2875fe0561569f82d0e63658ccf0d11ce7da8922 before 0c1f28c32a194303da630fca89481334b9547b80, from 2875fe0561569f82d0e63658ccf0d11ce7da8922 before a638b0461b58aa3205cd9d5f14d6f703d795b4af, 5.7
Not affected: before 5.7, from 6.1.93 up to 6.1.*, from 6.6.33 up to 6.6.*, from 6.9.4 up to 6.9.*, from 6.10 up to *
CVE List
linux linux_kernelfrom 5.7 before 6.1.93, from 6.2 before 6.6.33, from 6.7 before 6.9.4, 6.10NVD

Classification

CWE-787

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: riscv: evita la corrupción de pt_regs para subprocesos inactivos secundarios La parte superior de la pila de subprocesos del kernel debe reservarse para pt_regs. Sin embargo, este no es el caso de los subprocesos inactivos de los corazones de arranque secundarios. Sus pilas se superponen con sus pt_regs, por lo que ambos pueden corromperse. Se ha solucionado un problema similar para el corazón principal; consulte c7cdd96eca28 ("riscv: evite la corrupción de la pila reservando task_pt_regs(p) anticipadamente"). Sin embargo, esa solución no se propagó a los corazones secundarios. El problema se ha observado en algunas pruebas de conexión en caliente de CPU con V habilitado. La función smp_callin almacenó varios registros en la pila, corrompiendo la parte superior de la estructura pt_regs, incluido el campo de estado. Como resultado, el kernel intentó guardar o restaurar el contexto V inexistente.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-38667 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-38667 changed 2026-06-17Public domain