CVE-2025-40014 Details
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()
A vulnerability in the Linux kernel's objtool related to SPI frequency control for AMD has been addressed. The issue involved out-of-bounds stack access in the function amd_set_spi_freq(). When the frequency value was below a certain minimum threshold, the function improperly iterated through the entire frequency array without an early exit, causing the index to exceed the array limits. The vulnerability has been fixed by modifying the loop to stop at the last array entry, ensuring that lower frequency values are correctly adjusted to meet the minimum requirement. This fix also resolves a warning generated by the Undefined Behavior Sanitizer (UBSAN) in the kernel.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 1, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc | kernel.org | Patch |
| https://git.kernel.org/stable/c/7f2c746e09a3746bf937bc708129dc8af61d8f19 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-129 | Improper Validation of Array Index | [email protected] |
| CWE-129 | Improper Validation of Array Index | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.14, < 6.14.2 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 30, 2025 | Modified Analysis | [email protected] |
| Oct 1, 2025 | CVE Modified | CISA-ADP |
| Apr 29, 2025 | Initial Analysis | [email protected] |
| Apr 18, 2025 | New CVE Received | kernel.org |