CVE-2025-37945
net: phy: allow MDIO bus PM ops to start/stop state machine for phylink-controlled PHY
Check your servers for CVE-2025-37945
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-37945 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
net: phy: allow MDIO bus PM ops to start/stop state machine for phylink-controlled PHY
DSA has 2 kinds of drivers:
1. Those who call dsa_switch_suspend() and dsa_switch_resume() from their device PM ops: qca8k-8xxx, bcm_sf2, microchip ksz 2. Those who don't: all others. The above methods should be optional.
For type 1, dsa_switch_suspend() calls dsa_user_suspend() -> phylink_stop(), and dsa_switch_resume() calls dsa_user_resume() -> phylink_start(). These seem good candidates for setting mac_managed_pm = true because that is essentially its definition [1], but that does not seem to be the biggest problem for now, and is not what this change focuses on.
Talking strictly about the 2nd category of DSA drivers here (which do not have MAC managed PM, meaning that for their attached PHYs, mdio_bus_phy_suspend() and mdio_bus_phy_resume() should run in full), I have noticed that the following warning from mdio_bus_phy_resume() is triggered:
WARN_ON(phydev->state != PHY_HALTED && phydev->state != PHY_READY && phydev->state != PHY_UP);
because the PHY state machine is running.
It's running as a result of a previous dsa_user_open() -> ... -> phylink_start() -> phy_start() having been initiated by the user.
The previous mdio_bus_phy_suspend() was supposed to have called phy_stop_machine(), but it didn't. So this is why the PHY is in state PHY_NOLINK by the time mdio_bus_phy_resume() runs.
mdio_bus_phy_suspend() did not call phy_stop_machine() because for phylink, the phydev->adjust_link function pointer is NULL. This seems a technicality introduced by commit fddd91016d16 ("phylib: fix PAL state machine restart on resume"). That commit was written before phylink existed, and was intended to avoid crashing with consumer drivers which don't use the PHY state machine - phylink always does, when using a PHY. But phylink itself has historically not been developed with suspend/resume in mind, and apparently not tested too much in that scenario, allowing this bug to exist unnoticed for so long. Plus, prior to the WARN_ON(), it would have likely been invisible.
This issue is not in fact restricted to type 2 DSA drivers (according to the above ad-hoc classification), but can be extrapolated to any MAC driver with phylink and MDIO-bus-managed PHY PM ops. DSA is just where the issue was reported. Assuming mac_managed_pm is set correctly, a quick search indicates the following other drivers might be affected:
$ grep -Zlr PHYLINK_NETDEV drivers/ | xargs -0 grep -L mac_managed_pm drivers/net/ethernet/atheros/ag71xx.c drivers/net/ethernet/microchip/sparx5/sparx5_main.c drivers/net/ethernet/microchip/lan966x/lan966x_main.c drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c drivers/net/ethernet/freescale/dpaa/dpaa_eth.c drivers/net/ethernet/freescale/ucc_geth.c drivers/net/ethernet/freescale/enetc/enetc_pf_common.c drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c drivers/net/ethernet/marvell/mvneta.c drivers/net/ethernet/marvell/prestera/prestera_main.c drivers/net/ethernet/mediatek/mtk_eth_soc.c drivers/net/ethernet/altera/altera_tse_main.c drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c drivers/net/ethernet/meta/fbnic/fbnic_phylink.c drivers/net/ethernet/tehuti/tn40_phy.c drivers/net/ethernet/mscc/ocelot_net.c
Make the existing conditions dependent on the PHY device having a phydev->phy_link_change() implementation equal to the default phy_link_change() provided by phylib. Otherwise, we implicitly know that the phydev has the phylink-provided phylink_phy_change() callback, and when phylink is used, the PHY state machine always needs to be stopped/ started on the suspend/resume path. The code is structured as such that if phydev->phy_link_change() is absent, it is a matter of time until the kernel will crash - no need to further complicate the test.
Thus, for the situation where the PM is not managed b ---truncated---
Exploitation
EPSS 0.27%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 20.6% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 5 Nov 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 744d23c71af39c7dc77ac7c3cac87ae86a181a85, before 17eef1e44883845b9567afc893dc41e004c08d65 affected from 744d23c71af39c7dc77ac7c3cac87ae86a181a85, before 043aa41c43f8cb9cce75367ea07895ce68b5abb0 affected from 744d23c71af39c7dc77ac7c3cac87ae86a181a85, before a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259 affected from 744d23c71af39c7dc77ac7c3cac87ae86a181a85, before 54e5d00a8de6c13f6c01a94ed48025e882cd15f7 affected from 744d23c71af39c7dc77ac7c3cac87ae86a181a85, before bd4037d51d3f6667636a1383e78e48a5b7b60755 affected from 744d23c71af39c7dc77ac7c3cac87ae86a181a85, before fc75ea20ffb452652f0d4033f38fe88d7cfdae35 affected 47ac7b2f6a1ffef76e55a9ec146881a36673284b affected 7dc0ed411de3450e75b2a9600b5742cbf0908167 affected from 5.15.63, before 5.16 affected from 5.19.4, before 5.20
Other versions: unaffected
|
| Linux |
affected 6.0 unaffected before 6.0 unaffected from 6.1.168 up to and including 6.1.* unaffected from 6.6.122 up to and including 6.6.* unaffected from 6.12.24 up to and including 6.12.* unaffected from 6.13.12 up to and including 6.13.* unaffected from 6.14.3 up to and including 6.14.* unaffected 6.15 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-37945 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-37945
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-37945
trivy image --scanners vuln IMAGE | grep CVE-2025-37945
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/17eef1e44883845b9567afc893dc41e004c08d65 git.kernel.org
- https://git.kernel.org/stable/c/043aa41c43f8cb9cce75367ea07895ce68b5abb0 git.kernel.org
- https://git.kernel.org/stable/c/a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259 git.kernel.org
- https://git.kernel.org/stable/c/54e5d00a8de6c13f6c01a94ed48025e882cd15f7 git.kernel.org
- https://git.kernel.org/stable/c/bd4037d51d3f6667636a1383e78e48a5b7b60755 git.kernel.org
- https://git.kernel.org/stable/c/fc75ea20ffb452652f0d4033f38fe88d7cfdae35 git.kernel.org
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-457936.html cert-portal.siemens.com
Source: the record CVE-2025-37945 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse