Skip to contentSkip to conversation

CVE-2025-71196: phy: stm32-usphyc: Fix off by one in probe()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 4

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

phy: stm32-usphyc: Fix off by one in probe()

The "index" variable is used as an index into the usbphyc->phys[] array which has usbphyc->nphys elements. So if it is equal to usbphyc->nphys then it is one element out of bounds. The "index" comes from the device tree so it's data that we trust and it's unlikely to be wrong, however it's obviously still worth fixing the bug. Change the > to >=.

The Linux kernel CVE team has assigned CVE-2025-71196 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.17 with commit 94c358da3a0545205c6c6a50ae26141f1c73acfa and fixed in 6.6.122 with commit 76b870fdaad82171a24b8aacffe5e4d9e0d2ee2c
	Issue introduced in 4.17 with commit 94c358da3a0545205c6c6a50ae26141f1c73acfa and fixed in 6.12.67 with commit b91c9f6bfb04e430adeeac7e7ebc9d80f9d72bad
	Issue introduced in 4.17 with commit 94c358da3a0545205c6c6a50ae26141f1c73acfa and fixed in 6.18.7 with commit 7c27eaf183563b86d815ff6e9cca0210b4cfa051
	Issue introduced in 4.17 with commit 94c358da3a0545205c6c6a50ae26141f1c73acfa and fixed in 6.19-rc6 with commit cabd25b57216ddc132efbcc31f972baa03aad15a

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

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/phy/st/phy-stm32-usbphyc.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/76b870fdaad82171a24b8aacffe5e4d9e0d2ee2c
	https://git.kernel.org/stable/c/b91c9f6bfb04e430adeeac7e7ebc9d80f9d72bad
	https://git.kernel.org/stable/c/7c27eaf183563b86d815ff6e9cca0210b4cfa051
	https://git.kernel.org/stable/c/cabd25b57216ddc132efbcc31f972baa03aad15a