CVE-2025-40014
JSON

7.8high

objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()

Severity
7.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.26% (higher than 19% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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

Product or packageVersionsReported by
Linux Linuxfrom e6204f39fe3a7b4538815a2d778b601bd543649e before 7f2c746e09a3746bf937bc708129dc8af61d8f19, from e6204f39fe3a7b4538815a2d778b601bd543649e before 76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc, 6.14
Not affected: before 6.14, from 6.14.2 up to 6.14.*, from 6.15 up to *
CVE List
linux linux_kernelfrom 6.14 before 6.14.2NVD

All scores

CISA-ADP7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-129

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

What each source says

CVE List

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

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: objtool, spi: amd: Se corrige el acceso a la pila fuera de los límites en amd_set_spi_freq(). Si speed_hz &lt; AMD_SPI_MIN_HZ, amd_set_spi_freq() itera sobre toda la matriz amd_spi_freq sin interrumpir la ejecución antes de tiempo, lo que provoca que 'i' supere los límites de la matriz. Para solucionar esto, se detiene el bucle al llegar a la última entrada, de modo que el valor bajo de speed_hz se limite a AMD_SPI_MIN_HZ. Se corrige la siguiente advertencia con un kernel UBSAN: drivers/spi/spi-amd.o: error: objtool: amd_set_spi_freq() falla a la siguiente función amd_spi_set_opcode().

References

Sources

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