CVE Catalog

CVE-2025-40014

HighCVSS 7.8
Published: Updated: Translated: NVD NIST

Summary

The Linux kernel has a vulnerability in the amd_set_spi_freq() function of the SPI driver that can lead to out-of-bounds stack access. When speed_hz is less than AMD_SPI_MIN_HZ, the loop iterates beyond the amd_spi_freq array, causing undefined behavior.

Risk Assessment

This may lead to system crash or potential malicious code execution in kernel context. The risk affects systems with specific AMD SPI hardware.

Recommendation

Update the Linux kernel to a version containing the fix. If updating is not possible, avoid configuring speed_hz below AMD_SPI_MIN_HZ.

Other vulnerabilities in Linux kernel

See all
Original NVD description (English source)

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()

Vulnerability data from NVD (NIST) · CISA KEV · EPSS