CVE-2025-40014

published 18 Apr 2025 · updated 11 May 2026

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

7.8HighCVSS 7.8EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc and Kernel 7f2c746e09a3746bf937bc708129dc8af61d8f19.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
LinuxKernel=6.14, >=e6204f39fe3a7b4538815a2d778b601bd543649e <76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc, >=e6204f39fe3a7b4538815a2d778b601bd543649e <7f2c746e09a3746bf937bc708129dc8af61d8f1976e51db43fe4aaaebcc5ddda67b0807f7c9bdecc, 7f2c746e09a3746bf937bc708129dc8af61d8f19

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Kernel, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-40014 severity on Zeptric[![CVE-2025-40014](https://zeptric.io/badge/cve/CVE-2025-40014.svg)](https://zeptric.io/cve/CVE-2025-40014)