What’s Vulnerable › Vulnerabilities
CVE-2025-40014: objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-04-18 · updated 2026-06-17
- Weakness: CWE-129
Description
In the Linux kernel, the following vulnerability has been resolved: objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq() If speed_hz < AMD_SPI_MIN_HZ, amd_set_spi_freq() iterates over the entire amd_spi_freq array without breaking out early, causing 'i' to go beyond the array bounds. Fix that by stopping the loop when it gets to the last entry, so the low speed_hz value gets clamped up to AMD_SPI_MIN_HZ. Fixes the following warning with an UBSAN kernel: drivers/spi/spi-amd.o: error: objtool: amd_set_spi_freq() falls through to next function amd_spi_set_opcode()
Affected products
- Linux kernel: from 6.14 before 6.14.2 — fixed in 6.14.2
How to fix
Upgrade to a fixed version: Linux kernel 6.14.2. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc
- https://git.kernel.org/stable/c/7f2c746e09a3746bf937bc708129dc8af61d8f19
Get alerted when CVE-2025-40014 or the next vulnerability affects your stack