CVE-2025-40239 net: phy: micrel: always set shared->phydev for LAN8814

Not scored Published Updated

A null pointer dereference in the Linux kernel LAN8814 PHY driver causes a kernel crash when handling interrupts, leading to denial of service.

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

What is CVE-2025-40239?

CVE-2025-40239 is a vulnerability in Linux, published on 4 Dec 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: micrel: always set shared->phydev for LAN8814

Currently, during the LAN8814 PTP probe shared->phydev is only set if PTP clock gets actually set, otherwise the function will return before setting it.

This is an issue as shared->phydev is unconditionally being used when IRQ is being handled, especially in lan8814_gpio_process_cap and since it was not set it will cause a NULL pointer exception and crash the kernel.

So, simply always set shared->phydev to avoid the NULL pointer exception.

Which versions are affected by CVE-2025-40239?

How do I fix CVE-2025-40239?

Apply the vendor's patch.

Is CVE-2025-40239 being exploited?

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

Sources

Also known as BELL-CVE-2025-40239, DEBIAN-CVE-2025-40239, GHSA-g4v3-m8fj-mwj2, UBUNTU-CVE-2025-40239.

Is CVE-2025-40239 in your software?

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

Check your SBOMs for free