CVE-2025-39805: net: macb: fix unregister_netdev call order in macb_remove()
In the Linux kernel, the following vulnerability has been resolved:
net: macb: fix unregisternetdev call order in macbremove()
When removing a macb device, the driver calls phyexit() before unregisternetdev(). This leads to a WARN from kernfs:
------------[ cut here ]------------ kernfs: can not remove 'attacheddev', no directory WARNING: CPU: 1 PID: 27146 at fs/kernfs/dir.c:1683 Call trace: kernfsremovebynamens+0xd8/0xf0 sysfsremovelink+0x24/0x58 phydetach+0x5c/0x168 phydisconnect+0x4c/0x70 phylinkdisconnectphy+0x6c/0xc0 [phylink] macbclose+0x6c/0x170 [macb] ... macbremove+0x60/0x168 [macb] platformremove+0x5c/0x80 ...
The warning happens because the PHY is being exited while the netdev is still registered. The correct order is to unregister the netdev before shutting down the PHY and cleaning up the MDIO bus.
Fix this by moving unregisternetdev() ahead of phyexit() in macbremove().
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-39805?
CVE-2025-39805 has been classified with a low severity as it primarily involves a WARN message and does not result in a critical security threat.
How do I fix CVE-2025-39805?
To fix CVE-2025-39805, ensure that the Linux kernel is updated to a version where the vulnerability has been patched.
Which systems are affected by CVE-2025-39805?
CVE-2025-39805 affects the Linux kernel, particularly those using the macb driver for Ethernet devices.
What type of vulnerability is CVE-2025-39805?
CVE-2025-39805 is a driver-related vulnerability in the Linux kernel that concerns the order of function calls during device removal.
Can CVE-2025-39805 lead to system instability?
While CVE-2025-39805 produces a warning during device removal, it does not inherently cause system instability.