Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于MDIO总线PM操作未正确处理phylink控制的PHY。

AI Predicted 5.5 Difficulty: Theoretical EPSS 0.21% · P11

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 18

VendorProduct Version RangeStatus
Linux Linux 744d23c71af39c7dc77ac7c3cac87ae86a181a85< 17eef1e44883845b9567afc893dc41e004c08d65 affected
744d23c71af39c7dc77ac7c3cac87ae86a181a85< 043aa41c43f8cb9cce75367ea07895ce68b5abb0 affected
744d23c71af39c7dc77ac7c3cac87ae86a181a85< a6ed6f8ec81b8ca7100dcd9e62bdbc0dff1b2259 affected
744d23c71af39c7dc77ac7c3cac87ae86a181a85< 54e5d00a8de6c13f6c01a94ed48025e882cd15f7 affected
744d23c71af39c7dc77ac7c3cac87ae86a181a85< bd4037d51d3f6667636a1383e78e48a5b7b60755 affected
744d23c71af39c7dc77ac7c3cac87ae86a181a85< fc75ea20ffb452652f0d4033f38fe88d7cfdae35 affected
47ac7b2f6a1ffef76e55a9ec146881a36673284b affected
7dc0ed411de3450e75b2a9600b5742cbf0908167 affected
… +10 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-37945

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
net: phy: allow MDIO bus PM ops to start/stop state machine for phylink-controlled PHY
Source: CVE Program / CVE List V5
Vulnerability 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---
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于MDIO总线PM操作未正确处理phylink控制的PHY。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 744d23c71af39c7dc77ac7c3cac87ae86a181a85 ~ 17eef1e44883845b9567afc893dc41e004c08d65 -
Linux Linux 6.0 -

II. Public POCs for CVE-2025-37945

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-37945

请登录查看更多情报信息。

Patches & Fixes for CVE-2025-37945 (1)

Same Patch Batch · Linux · 2025-05-20 · 95 CVEs total

CVE-2025-37894 9.8 CRITICAL net: use sock_gen_put() when sk_state is TCP_TIME_WAIT
CVE-2025-37924 9.8 CRITICAL ksmbd: fix use-after-free in kerberos authentication
CVE-2025-37935 9.8 CRITICAL net: ethernet: mtk_eth_soc: fix SER panic with 4GB+ RAM
CVE-2025-37959 9.4 CRITICAL bpf: Scrub packet on bpf_redirect_peer
CVE-2025-37926 8.8 HIGH ksmbd: fix use-after-free in ksmbd_session_rpc_open
CVE-2025-37899 8.8 HIGH ksmbd: fix use-after-free in session logoff
CVE-2025-37918 8.8 HIGH Bluetooth: btusb: avoid NULL pointer dereference in skb_dequeue()
CVE-2025-37943 8.8 HIGH wifi: ath12k: Fix invalid data access in ath12k_dp_rx_h_undecap_nwifi
CVE-2025-37944 8.8 HIGH wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process
CVE-2025-37947 8.8 HIGH ksmbd: prevent out-of-bounds stream writes by validating *pos
CVE-2025-37952 8.8 HIGH ksmbd: Fix UAF in __close_file_table_ids
CVE-2025-37956 8.8 HIGH ksmbd: prevent rename with empty string
CVE-2025-37957 8.8 HIGH KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception
CVE-2025-37936 8.7 HIGH perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.
CVE-2025-37973 8.1 HIGH wifi: cfg80211: fix out-of-bounds access during multi-link element defragmentation
CVE-2025-37903 7.8 HIGH drm/amd/display: Fix slab-use-after-free in hdcp
CVE-2025-37901 7.8 HIGH irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs
CVE-2025-37923 7.8 HIGH tracing: Fix oob write in trace_seq_to_buffer()
CVE-2025-37921 7.8 HIGH vxlan: vnifilter: Fix unlocked deletion of default FDB entry
CVE-2025-37920 7.8 HIGH xsk: Fix race condition in AF_XDP generic RX path

Showing top 20 of 95 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-37945

No comments yet


Leave a comment