CVE-2025-39805

Source
https://cve.org/CVERecord?id=CVE-2025-39805
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39805.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39805
Downstream
Related
Published
2025-09-16T13:00:06.731Z
Modified
2026-03-20T12:43:03.393462Z
Summary
net: macb: fix unregister_netdev call order in macb_remove()
Details

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 macb_remove().

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39805.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8b73fa3ae02b2401960de41b0454c0321377b203
Fixed
7351782f2fc8ac31ced52e3d4e6fa120f819a7ab
Fixed
2b9719ccad38dffad7dbdd2f39896f723f9b9011
Fixed
ff0d3bad32108b57265e5b48f15327549af771d3
Fixed
775fe690fd4a3337ad2115de2adb41b227d4dae7
Fixed
01b9128c5db1b470575d07b05b67ffa3cb02ebf1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39805.json"