CVE-2025-37989 net: phy: leds: fix memory leak

Medium 5.5 Published Updated

A memory leak in the Linux kernel PHY LED trigger code can cause out-of-memory conditions during network restarts, leading to denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-37989?

CVE-2025-37989 is a medium-severity denial of service vulnerability in Debian Debian Linux, published on 20 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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.

Weakness: CWE-401

Which versions are affected by CVE-2025-37989?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2025-37989?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-37989 being exploited?

There is no known exploitation of CVE-2025-37989 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as BELL-CVE-2025-37989, DEBIAN-CVE-2025-37989, GHSA-ff73-mwmp-6jw5, ROOT-OS-DEBIAN-11-CVE-2025-37989, ROOT-OS-UBUNTU-2204-CVE-2025-37989, ROOT-OS-UBUNTU-2404-CVE-2025-37989 and 1 more.

Is CVE-2025-37989 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free