CVE-2025-40014Improper Validation of Array Index in Linux

Severity
7.8HIGHNVD
EPSS
0.1%
top 77.10%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedApr 18
Latest updateJul 8

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-am

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitability: 1.8 | Impact: 5.9

Affected Packages6 packages

NVDlinux/linux_kernel6.146.14.2
Debianlinux/linux_kernel< 6.16.3-1
Ubuntulinux/linux_kernel< 6.14.0-22.22
CVEListV5linux/linuxe6204f39fe3a7b4538815a2d778b601bd543649e7f2c746e09a3746bf937bc708129dc8af61d8f19+2

Patches

🔴Vulnerability Details

5
OSV
linux-aws, linux-oracle vulnerabilities2025-07-08
OSV
linux-azure vulnerabilities2025-06-26
OSV
linux, linux-gcp, linux-raspi, linux-realtime vulnerabilities2025-06-24
OSV
CVE-2025-40014: 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_h2025-04-18
GHSA
GHSA-jhjh-hcm6-mrcc: 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 speed2025-04-18

📋Vendor Advisories

6
Ubuntu
Linux kernel vulnerabilities2025-07-08
Ubuntu
Linux kernel (Azure) vulnerabilities2025-06-26
Ubuntu
Linux kernel vulnerabilities2025-06-24
Red Hat
kernel: objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()2025-04-18
Microsoft
objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()2025-04-08
CVE-2025-40014 — Improper Validation of Array Index | cvebase