# CVE-2025-37945: net: phy: allow MDIO bus PM ops to start/stop state machine for phylink-controlled PHY

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-05-20T15:58:20.841Z
- **Modified:** 2026-11-10T13:17:44.547Z

## Who should check

- Anyone running Linux \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 17eef1e44883845b9567afc893dc41e004c08d65; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 043aa41c43f8cb9cce75367ea07895ce68b5abb0; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 54e5d00a8de6c13f6c01a94ed48025e882cd15f7; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< bd4037d51d3f6667636a1383e78e48a5b7b60755; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< fc75ea20ffb452652f0d4033f38fe88d7cfdae35; 47ac7b2f6a1ffef76e55a9ec146881a36673284b; 7dc0ed411de3450e75b2a9600b5742cbf0908167; \>= 5.15.63, \< 5.16; \>= 5.19.4, \< 5.20
- Anyone running Linux 6.0

## 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---

## Affected and fixed versions

- Linux: \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 17eef1e44883845b9567afc893dc41e004c08d65; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 043aa41c43f8cb9cce75367ea07895ce68b5abb0; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 54e5d00a8de6c13f6c01a94ed48025e882cd15f7; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< bd4037d51d3f6667636a1383e78e48a5b7b60755; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< fc75ea20ffb452652f0d4033f38fe88d7cfdae35; 47ac7b2f6a1ffef76e55a9ec146881a36673284b; 7dc0ed411de3450e75b2a9600b5742cbf0908167; \>= 5.15.63, \< 5.16; \>= 5.19.4, \< 5.20 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- Upgrade Linux to 5.20 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-37945. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-37945.md
Affected: Linux >= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, < 17eef1e44883845b9567afc893dc41e004c08d65; >= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, < 043aa41c43f8cb9cce75367ea07895ce68b5abb0; >= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, < a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259; >= 744d23c71af39c7dc77ac7c…
Fixed in: Linux 17eef1e44883845b9567afc893dc41e004c08d65, Linux 043aa41c43f8cb9cce75367ea07895ce68b5abb0, Linux 54e5d00a8de6c13f6c01a94ed48025e882cd15f7, Linux 5.16, Linux 5.20

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-37945 being exploited?

There is no confirmed exploitation: CVE-2025-37945 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-37945?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-37945?

Linux \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 17eef1e44883845b9567afc893dc41e004c08d65; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 043aa41c43f8cb9cce75367ea07895ce68b5abb0; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< 54e5d00a8de6c13f6c01a94ed48025e882cd15f7; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< bd4037d51d3f6667636a1383e78e48a5b7b60755; \>= 744d23c71af39c7dc77ac7c3cac87ae86a181a85, \< fc75ea20ffb452652f0d4033f38fe88d7cfdae35; 47ac7b2f6a1ffef76e55a9ec146881a36673284b; 7dc0ed411de3450e75b2a9600b5742cbf0908167; \>= 5.15.63, \< 5.16; \>= 5.19.4, \< 5.20; Linux 6.0.

### Is there a fix for CVE-2025-37945?

Yes. Fixed in Linux 17eef1e44883845b9567afc893dc41e004c08d65, Linux 043aa41c43f8cb9cce75367ea07895ce68b5abb0, Linux 54e5d00a8de6c13f6c01a94ed48025e882cd15f7, Linux 5.16, Linux 5.20. Upgrade Linux to 5.20 or later.

### How do I check if I'm affected by CVE-2025-37945?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/043aa41c43f8cb9cce75367ea07895ce68b5abb0>
- patch: <https://git.kernel.org/stable/c/a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259>
- patch: <https://git.kernel.org/stable/c/54e5d00a8de6c13f6c01a94ed48025e882cd15f7>
- patch: <https://git.kernel.org/stable/c/bd4037d51d3f6667636a1383e78e48a5b7b60755>
- patch: <https://git.kernel.org/stable/c/fc75ea20ffb452652f0d4033f38fe88d7cfdae35>
- other: <https://git.kernel.org/stable/c/17eef1e44883845b9567afc893dc41e004c08d65>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-37945>

HTML: <https://flawdb.com/CVE-2025-37945> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-37945>
