[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025041822-CVE-2025-40014-384f@gregkh>
Date: Fri, 18 Apr 2025 09:02:32 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-40014: objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
From: Greg Kroah-Hartman <gregkh@...nel.org>
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()
The Linux kernel CVE team has assigned CVE-2025-40014 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.1 with commit 3fe26121dc3a9bf64e18fe0075cd9a92c9cd1b1a and fixed in 6.14.2 with commit 7f2c746e09a3746bf937bc708129dc8af61d8f19
Issue introduced in 6.1 with commit 3fe26121dc3a9bf64e18fe0075cd9a92c9cd1b1a and fixed in 6.15-rc1 with commit 76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-40014
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/spi/spi-amd.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/7f2c746e09a3746bf937bc708129dc8af61d8f19
https://git.kernel.org/stable/c/76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc
Powered by blists - more mailing lists