{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-39805",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T07:20:57.136Z",
        "datePublished": "2025-09-16T13:00:06.731Z",
        "dateUpdated": "2026-05-11T21:36:36.596Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-11T21:36:36.596Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: macb: fix unregister_netdev call order in macb_remove()\n\nWhen removing a macb device, the driver calls phy_exit() before\nunregister_netdev(). This leads to a WARN from kernfs:\n\n  ------------[ cut here ]------------\n  kernfs: can not remove 'attached_dev', no directory\n  WARNING: CPU: 1 PID: 27146 at fs/kernfs/dir.c:1683\n  Call trace:\n    kernfs_remove_by_name_ns+0xd8/0xf0\n    sysfs_remove_link+0x24/0x58\n    phy_detach+0x5c/0x168\n    phy_disconnect+0x4c/0x70\n    phylink_disconnect_phy+0x6c/0xc0 [phylink]\n    macb_close+0x6c/0x170 [macb]\n    ...\n    macb_remove+0x60/0x168 [macb]\n    platform_remove+0x5c/0x80\n    ...\n\nThe warning happens because the PHY is being exited while the netdev\nis still registered. The correct order is to unregister the netdev\nbefore shutting down the PHY and cleaning up the MDIO bus.\n\nFix this by moving unregister_netdev() ahead of phy_exit() in\nmacb_remove()."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/ethernet/cadence/macb_main.c"
                    ],
                    "versions": [
                        {
                            "version": "8b73fa3ae02b2401960de41b0454c0321377b203",
                            "lessThan": "7351782f2fc8ac31ced52e3d4e6fa120f819a7ab",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8b73fa3ae02b2401960de41b0454c0321377b203",
                            "lessThan": "2b9719ccad38dffad7dbdd2f39896f723f9b9011",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8b73fa3ae02b2401960de41b0454c0321377b203",
                            "lessThan": "ff0d3bad32108b57265e5b48f15327549af771d3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8b73fa3ae02b2401960de41b0454c0321377b203",
                            "lessThan": "775fe690fd4a3337ad2115de2adb41b227d4dae7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8b73fa3ae02b2401960de41b0454c0321377b203",
                            "lessThan": "01b9128c5db1b470575d07b05b67ffa3cb02ebf1",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/ethernet/cadence/macb_main.c"
                    ],
                    "versions": [
                        {
                            "version": "5.18",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.18",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.159",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.119",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.45",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16.5",
                            "lessThanOrEqual": "6.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.17",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.1.159"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.6.119"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.12.45"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.16.5"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.17"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/7351782f2fc8ac31ced52e3d4e6fa120f819a7ab"
                },
                {
                    "url": "https://git.kernel.org/stable/c/2b9719ccad38dffad7dbdd2f39896f723f9b9011"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ff0d3bad32108b57265e5b48f15327549af771d3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/775fe690fd4a3337ad2115de2adb41b227d4dae7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/01b9128c5db1b470575d07b05b67ffa3cb02ebf1"
                }
            ],
            "title": "net: macb: fix unregister_netdev call order in macb_remove()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}