CVE-2025-23155 net: stmmac: Fix accessing freed irq affinity_hint

High 7.1 Published Updated

An unprivileged user can trigger a use-after-free in the stmmac driver via procfs, causing kernel crashes or leaking kernel memory.

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-23155?

CVE-2025-23155 is a high-severity use after free vulnerability in Linux kernel, published on 1 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: stmmac: Fix accessing freed irq affinity_hint

In stmmac_request_irq_multi_msi(), a pointer to the stack variable cpu_mask is passed to irq_set_affinity_hint(). This value is stored in irq_desc->affinity_hint, but once stmmac_request_irq_multi_msi() returns, the pointer becomes dangling.

The affinity_hint is exposed via procfs with S_IRUGO permissions, allowing any unprivileged process to read it. Accessing this stale pointer can lead to:

- a kernel oops or panic if the referenced memory has been released and unmapped, or - leakage of kernel data into userspace if the memory is re-used for other purposes.

All platforms that use stmmac with PCI MSI (Intel, Loongson, etc) are affected.

Which versions are affected by CVE-2025-23155?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-23155?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-23155 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-62601, AZL-69668, BELL-CVE-2025-23155, DEBIAN-CVE-2025-23155, GHSA-w4x2-878r-xjgp, ROOT-OS-DEBIAN-12-CVE-2025-23155 and 3 more.

Is CVE-2025-23155 in your software?

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

Check your SBOMs for free