CVE-2026-64228 PUBLISHED

net: ethtool: phy: avoid NULL deref when PHY driver is unbound

Assigner: Linux
Reserved: 19.07.2026 Published: 24.07.2026 Updated: 24.07.2026

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

net: ethtool: phy: avoid NULL deref when PHY driver is unbound

phydev->drv can become NULL while the phy_device is still attached to its net_device, namely after the PHY driver is unbound via sysfs:

<pre>echo <mdio_id> > /sys/bus/mdio_bus/drivers/<phy_drv>/unbind </pre>

phy_remove() clears phydev->drv but doesn't call phy_detach(), so the phy_device stays in the link topology xarray and ethnl_req_get_phydev() still hands it back. ETHTOOL_MSG_PHY_GET then oopses on:

<pre>rep_data->drvname = kstrdup(phydev->drv->name, GFP_KERNEL); </pre>

drvname is already treated as optional by phy_reply_size(), phy_fill_reply() and phy_cleanup_data(), so just skip the allocation when there is no driver bound.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 9dd2ad5e92b962d1349a7541d167e8e214e49f95 to 3586924625559e6f9876d726c80ff0a75f0d5849 (excl.)
  • affected from 9dd2ad5e92b962d1349a7541d167e8e214e49f95 to 17fe2381f967d353183f374a1c0181a6d194158c (excl.)
  • affected from 9dd2ad5e92b962d1349a7541d167e8e214e49f95 to e3adf69f8eb121a9128c2b0029efd050d3649153 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.16 is affected
  • unaffected from 0 to 6.16 (excl.)
  • unaffected from 6.18.34 to 6.18.* (incl.)
  • unaffected from 7.0.11 to 7.0.* (incl.)
  • unaffected from 7.1 to * (incl.)

References