phy: stm32-usphyc: Fix off by one in probe()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 94c358da3a0545205c6c6a50ae26141f1c73acfa · < 7c27eaf183563b86d815ff6e9cca0210b4cfa051| No fix yet |
| Linux Linux |
|
|
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 >=.
From the CVE record · Linux
The Linux kernel’s stm32-usphyc probe can access one element past the usbphyc->phys[] array when a device-tree index equals usbphyc->nphys. The input does not describe an attacker-controlled route, authentication requirements, or user interaction.
Engineers running Linux kernels with the stm32-usphyc driver should check their versions against the vendor advisory; affected versions are not specified.