CVE-2024-38667: riscv: prevent pt_regs corruption for secondary idle threads
In the Linux kernel, the following vulnerability has been resolved:
riscv: prevent ptregs corruption for secondary idle threads
Top of the kernel thread stack should be reserved for ptregs. However this is not the case for the idle threads of the secondary boot harts. Their stacks overlap with their ptregs, so both may get corrupted.
Similar issue has been fixed for the primary hart, see c7cdd96eca28 ("riscv: prevent stack corruption by reserving taskptregs(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 smpcallin stored several registers on stack, corrupting top of ptregs structure including status field. As a result, kernel attempted to save or restore inexistent V context.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-38667?
CVE-2024-38667 is classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2024-38667?
To fix CVE-2024-38667, upgrade your Linux kernel to version 6.1.123-1 or higher.
What systems are affected by CVE-2024-38667?
CVE-2024-38667 affects various versions of the Linux kernel, specifically versions up to 5.7 and within specified ranges from 6.1, 6.6, and 6.9.
What is the impact of CVE-2024-38667 on system security?
The impact of CVE-2024-38667 may lead to the corruption of pt_regs for secondary idle threads, potentially affecting system stability.
Are there specific distributions impacted by CVE-2024-38667?
Yes, Debian Linux versions prior to the specified updates are impacted by CVE-2024-38667.