CVE-2025-40014

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

High · published April 18, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
13.3
In the wild
Unconfirmed
What it is

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

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00233 · 13.3th percentile
Published
2025-04-18T07:01Z
EPSS history
Timeline
  • 18 APR 07:01Z
    objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
    cvelistv5