CVE-2025-40014
kernel: objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 18, 2025
Updated · July 23, 2026
Description
A flaw was discovered in the Linux kernel’s AMD SPI controller driver (amd_set_spi_freq()), which calculates a frequency index without validating its range when a very low clock rate is requested. If the requested frequency (speed_hz) is below the minimum supported value (AMD_SPI_MIN_HZ), the code may access beyond the end of an internal frequency table on the stack. A local, unprivileged user could trigger this issue to cause memory corruption, leading to a system crash or potentially exposing sensitive information. The fix limits the loop to valid entries, ensuring out-of-bounds access cannot occur.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 7.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
CWE-125 · Out-of-bounds Read