CVE-2025-37989
NoneCVSS
—
EPSS
0.2%
Published
May 20, 2025
CISA due date
—
Cloudanix analysis
A flaw in Linux kernel networking can slowly drain memory when network connections restart repeatedly, risking crashes on routers and network equipment.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Misuse of devm API in PHY LED trigger code allows repeated register/unregister calls on attach/detach without freeing kzalloc memory until driver unbind, resulting in undetected leaks.
Why it matters to the business
Repeated network restarts on routers and Linux-based network devices can exhaust system memory, causing instability, degraded performance, or outages in high-availability network environments.
How an attack unfolds
An attacker triggers repeated PHY attach and detach sequences through network interface manipulation or restarts; memory accumulates across cycles because devm allocations persist, leading to OOM. Advanced spyware campaigns and actors chaining Linux kernel privilege escalation flaws may leverage this for denial-of-service or to facilitate further exploitation.
How to fix it
Upgrade the Linux kernel to a version containing commit 966d6494e2ed9be9052fcd9815afba830896aaf8, replacing devm_kzalloc/devm_kcalloc with kzalloc/kcalloc and adding corresponding kfree calls in the unregister path.
How to confirm the fix worked
Confirm the patch is present by inspecting phy_led_triggers_register for kzalloc usage and phy_led_triggers_unregister for kfree; re-run network restart tests to verify absence of memory growth.
Typical attack path
- Gain ability to trigger network restarts or PHY attach/detach on target Linux system
- Repeatedly cycle network interfaces or PHY devices
- Observe progressive kernel memory consumption bypassing kmemleak detection
- Induce out-of-memory condition affecting system stability
How to detect it
Review kernel logs for OOM killer activity tied to network PHY subsystems; correlate repeated phy_attach_direct and phy_detach events with rising slab or kmalloc usage; examine threat actor patterns from advanced spyware or related kernel escalation campaigns for similar memory exhaustion attempts.
What your security team should do
- Prioritize kernel upgrade to the fixed commit across all affected systems due to 526 days since publication
- Restrict unnecessary network restart operations in production environments
- Incorporate PHY LED trigger memory accounting into routine kernel leak monitoring
The record
In the Linux kernel, the following vulnerability has been resolved: net: phy: leds: fix memory leak A network restart test on a router led to an out-of-memory condition, which was traced to a memory leak in the PHY LED trigger code. The root cause is misuse of the devm API. The registration function (phy_led_triggers_register) is called from phy_attach_direct, not phy_probe, and the unregister function (phy_led_triggers_unregister) is called from phy_detach, not phy_remove. This means the register and unregister functions can be called multiple times for the same PHY device, but devm-allocated memory is not freed until the driver is unbound. This also prevents kmemleak from detecting the leak, as the devm API internally stores the allocated pointer. Fix this by replacing devm_kzalloc/devm_kcalloc with standard kzalloc/kcalloc, and add the corresponding kfree calls in the unregister path.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | linux | 0 | 5.10.237-1 |
| Debian:11 | linux-6.1 | 0 | 6.1.137-1~deb11u1 |
| Debian:12 | linux | 0 | 6.1.137-1 |
| Debian:13 | linux | 0 | 6.12.27-1 |
| Linux | Kernel | 4.10.0 | 5.4.293 |
| Mageia:9 | dwarves | 0 | 1.30-1.mga9 |
| Mageia:9 | kernel | 0 | 6.6.93-1.mga9 |
| Mageia:9 | kernel-firmware | 0 | 20250509-1.mga9 |
| Mageia:9 | kernel-firmware-nonfree | 0 | 20250509-1.mga9.nonfree |
| Mageia:9 | kernel-linus | 0 | 6.6.93-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.1.8-3.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-80.mga9 |
| Mageia:9 | libtraceevent | 0 | 1.8.4-1.mga9 |
| Mageia:9 | libtracefs | 0 | 1.8.2-1.mga9 |
| Mageia:9 | radeon-firmware | 0 | 20250509-1.mga9.nonfree |
| Mageia:9 | wireless-regdb | 0 | 20250220-1.mga9 |
| SUSE:Linux Enterprise High Availability Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kernel-default | 0 | 4.12.14-122.261.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_69 | 0 | 1-8.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_11 | 0 | 1-150600.1.3.2 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_12 | 0 | 1-150600.13.3.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-64kb | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default-base | 0 | 6.4.0-150600.23.53.1.150600.12.24.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-coco | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-coco_debug | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-source-coco | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-syms-coco | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-docs | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-obs-build | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-syms | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-azure | 0 | 6.4.0-150600.8.40.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-source-azure | 0 | 6.4.0-150600.8.40.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-syms-azure | 0 | 6.4.0-150600.8.40.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-default | 0 | 4.12.14-122.261.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-source | 0 | 4.12.14-122.261.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-syms | 0 | 4.12.14-122.261.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-default | 0 | 4.12.14-122.261.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-source | 0 | 4.12.14-122.261.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-syms | 0 | 4.12.14-122.261.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.53.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt | 0 | 6.4.0-150600.10.39.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt_debug | 0 | 6.4.0-150600.10.39.1 |
| SUSE:Real Time Module 15 SP6 | kernel-source-rt | 0 | 6.4.0-150600.10.39.1 |
| SUSE:Real Time Module 15 SP6 | kernel-syms-rt | 0 | 6.4.0-150600.10.39.1 |
| openSUSE:Leap 15.6 | dtb-aarch64 | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-64kb | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-azure | 0 | 6.4.0-150600.8.40.1 |
| openSUSE:Leap 15.6 | kernel-debug | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-default | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-default-base | 0 | 6.4.0-150600.23.53.1.150600.12.24.1 |
| openSUSE:Leap 15.6 | kernel-docs | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-kvmsmall | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-obs-build | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-obs-qa | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-rt | 0 | 6.4.0-150600.10.39.1 |
| openSUSE:Leap 15.6 | kernel-rt_debug | 0 | 6.4.0-150600.10.39.1 |
| openSUSE:Leap 15.6 | kernel-source | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-source-azure | 0 | 6.4.0-150600.8.40.1 |
| openSUSE:Leap 15.6 | kernel-source-rt | 0 | 6.4.0-150600.10.39.1 |
| openSUSE:Leap 15.6 | kernel-syms | 0 | 6.4.0-150600.23.53.1 |
| openSUSE:Leap 15.6 | kernel-syms-azure | 0 | 6.4.0-150600.8.40.1 |
| openSUSE:Leap 15.6 | kernel-syms-rt | 0 | 6.4.0-150600.10.39.1 |
| openSUSE:Leap 15.6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.53.1 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39869 In the Linux kernel, the following vulnerability has been resolved: dmaengine: ti: edma… Also affects linux
- CVE-2025-39873 In the Linux kernel, the following vulnerability has been resolved: can: xilinx_can… Also affects linux
- CVE-2025-39863 In the Linux kernel, the following vulnerability has been resolved: wifi: brcmfmac: fix… Also affects linux
- CVE-2025-39865 In the Linux kernel, the following vulnerability has been resolved: tee: fix NULL pointer… Also affects linux
- CVE-2025-39866 In the Linux kernel, the following vulnerability has been resolved: fs: writeback: fix… Also affects linux