CVE-2026-64228 in Linuxinfo

Summary

by MITRE • 07/24/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:

echo > /sys/bus/mdio_bus/drivers//unbind

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:

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

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 07/24/2026

This vulnerability represents a critical null pointer dereference issue within the Linux kernel's ethernet tooling subsystem, specifically affecting the ethtool functionality when dealing with phy device management. The flaw occurs in the network subsystem where the kernel maintains references to physical layer (PHY) devices that communicate with network hardware through mdio buses. When a PHY driver is unbound from its associated mdio bus through sysfs interface, the kernel properly clears the driver reference but fails to completely detach the phy device from the network topology, leaving it in an inconsistent state where the device structure remains accessible but lacks valid driver context.

The technical execution of this vulnerability involves a specific code path that begins with the phy_remove() function which correctly nulls out the phydev->drv pointer but neglects to invoke the phy_detach() cleanup routine. This oversight leaves the phy_device structure embedded within the link topology xarray data structure, maintaining references even though no driver is actively managing the device. Subsequently, when ethnl_req_get_phydev() processes requests for PHY information, it continues to return these orphaned phy_device structures to userspace applications. The actual crash occurs during ETHTOOL_MSG_PHY_GET operations when the code attempts to access phydev->drv->name without proper null checking, resulting in a kernel oops and system instability.

The operational impact of this vulnerability extends beyond simple system crashes to potentially enable denial of service attacks against network services that rely on ethtool functionality for device monitoring and configuration. Network administrators using tools like ethtool to query PHY status information could inadvertently trigger the null pointer dereference, causing the kernel to panic and requiring manual system reboot. This vulnerability particularly affects systems running kernel versions where the mdio bus driver unbinding process does not properly handle cleanup of attached phy devices, making it a persistent threat in environments where dynamic driver loading and unloading occurs frequently.

The root cause aligns with CWE-476 which specifically addresses null pointer dereference vulnerabilities in software systems. This weakness manifests when code assumes that pointers will always contain valid references to objects, failing to account for scenarios where such references may become invalid during program execution. The vulnerability also intersects with ATT&CK technique T1548.001 related to privilege escalation through kernel exploits, as attackers could potentially leverage this null pointer dereference to gain unauthorized access to system resources or cause persistent service disruption.

Mitigation strategies should focus on implementing proper null checking mechanisms within the ethtool subsystem before accessing phydev->drv structure members. The recommended fix involves modifying the phy_reply_size(), phy_fill_reply(), and phy_cleanup_data() functions to skip driver name allocation when no driver is bound to the phy device, as suggested in the original patch. Additionally, system administrators should implement proper driver unbinding procedures that ensure complete cleanup of phy device references and consider implementing monitoring mechanisms to detect and alert on unusual driver unbinding events that might indicate potential exploitation attempts. Regular kernel updates remain essential to protect against this vulnerability while also implementing defensive measures such as restricting access to sysfs interfaces that enable driver unbinding operations in production environments where stability is paramount.

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!