net: phy: micrel: always set shared->phydev for LAN8814
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 |
|
|
6.12.566.17.66.18In the Linux kernel, the following vulnerability has been resolved:
net: phy: micrel: always set shared->phydev for LAN8814
Currently, during the LAN8814 PTP probe shared->phydev is only set if PTP clock gets actually set, otherwise the function will return before setting it.
This is an issue as shared->phydev is unconditionally being used when IRQ is being handled, especially in lan8814_gpio_process_cap and since it was not set it will cause a NULL pointer exception and crash the kernel.
So, simply always set shared->phydev to avoid the NULL pointer exception.
From the CVE record · Linux
The Linux kernel’s LAN8814 PHY driver can leave a shared device pointer unset when the PTP clock is not set. If an IRQ is then handled, use of that pointer can cause a NULL pointer exception and crash the kernel. The input does not specify whether an attacker can trigger this condition or what access would be required.
Engineers running Linux kernels with the LAN8814 PHY driver should check their systems; affected versions are not specified.