CVE-2025-40158 ipv6: use RCU in ip6_output()

High 8.1 Published Updated

A use-after-free vulnerability in the Linux kernel IPv6 output path allows attackers to potentially execute code or cause a system crash.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-40158?

CVE-2025-40158 is a high-severity use after free vulnerability in Linux, published on 12 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

ipv6: use RCU in ip6_output()

Use RCU in ip6_output() in order to use dst_dev_rcu() to prevent possible UAF.

We can remove rcu_read_lock()/rcu_read_unlock() pairs from ip6_finish_output2().

Which versions are affected by CVE-2025-40158?

How do I fix CVE-2025-40158?

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-40158 being exploited?

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

Sources

Also known as AZL-70025, BELL-CVE-2025-40158, DEBIAN-CVE-2025-40158, GHSA-4g43-pmw7-v27w, ROOT-OS-DEBIAN-11-CVE-2025-40158, ROOT-OS-DEBIAN-12-CVE-2025-40158 and 4 more.

Is CVE-2025-40158 in your software?

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

Check your SBOMs for free