CVE-2025-39872 hsr: hold rcu and dev lock for hsr_get_port_ndev
A use-after-free vulnerability in the Linux kernel HSR module allows attackers to potentially execute code or escalate privileges due to missing locks.
- 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-39872?
CVE-2025-39872 is a high-severity use after free vulnerability in Linux kernel, published on 23 Sep 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:
hsr: hold rcu and dev lock for hsr_get_port_ndev
hsr_get_port_ndev calls hsr_for_each_port, which need to hold rcu lock. On the other hand, before return the port device, we need to hold the device reference to avoid UaF in the caller function.
Which versions are affected by CVE-2025-39872?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-39872?
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-39872 being exploited?
There is no known exploitation of CVE-2025-39872 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-39872, DEBIAN-CVE-2025-39872, GHSA-mmm9-rxc2-w4wp, ROOT-OS-DEBIAN-13-CVE-2025-39872, UBUNTU-CVE-2025-39872.