CVE-2025-40014

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-40014
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40014.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-40014
Downstream
Related
Published
2025-04-18T07:01:40Z
Modified
2025-10-16T05:27:29.838227Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
Details

In the Linux kernel, the following vulnerability has been resolved:

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

If speedhz < AMDSPIMINHZ, amdsetspifreq() iterates over the entire amdspi_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 speedhz value gets clamped up to AMDSPIMINHZ.

Fixes the following warning with an UBSAN kernel:

drivers/spi/spi-amd.o: error: objtool: amdsetspifreq() falls through to next function amdspisetopcode()

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3fe26121dc3a9bf64e18fe0075cd9a92c9cd1b1a
Fixed
7f2c746e09a3746bf937bc708129dc8af61d8f19
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3fe26121dc3a9bf64e18fe0075cd9a92c9cd1b1a
Fixed
76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc

Affected versions

v6.*

v6.0
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.1
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-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