net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link
When using a fixed-link, the altr_tse_pcs driver crashes due to null-pointer dereference as no phy_device is provided to tse_pcs_fix_mac_speed function. Fix this by adding a check for phy_dev before calling the tse_pcs_fix_mac_speed() function.
Also clean up the tse_pcs_fix_mac_speed function a bit. There is no need to check for splitter_base and sgmii_adapter_base because the driver will fail if these 2 variables are not derived from the device tree.
From the CVE record · Linux
The Linux kernel's altr_tse_pcs driver can dereference a null pointer when used with a fixed-link because no phy_device is provided to tse_pcs_fix_mac_speed(). This can crash the driver. The input does not specify an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels that use the altr_tse_pcs driver with a fixed-link should check their systems; affected versions are not specified.