net/mdiobus: Fix potential out-of-bounds clause 45 read/write access
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/mdiobus: Fix potential out-of-bounds clause 45 read/write access
When using publicly available tools like 'mdio-tools' to read/write data from/to network interface and its PHY via C45 (clause 45) mdiobus, there is no verification of parameters passed to the ioctl and it accepts any mdio address. Currently there is support for 32 addresses in kernel via PHY_MAX_ADDR define, but it is possible to pass higher value than that via ioctl. While read/write operation should generally fail in this case, mdiobus provides stats array, where wrong address may allow out-of-bounds read/write.
Fix that by adding address verification before C45 read/write operation. While this excludes this access from any statistics, it improves security of read/write operation.
From the CVE record · Linux
The Linux kernel does not validate MDIO addresses passed to the ioctl for Clause 45 reads and writes. A local user able to issue that ioctl can supply an address beyond the 32 supported PHY addresses, potentially causing an out-of-bounds read or write in the mdiobus statistics array.
Engineers running the Linux kernel should check whether their kernel includes the net/mdiobus address-validation fix; affected versions were not specified.