CVE-2025-39872
NoneCVSS
—
EPSS
0.2%
Published
Sep 23, 2025
CISA due date
—
Cloudanix analysis
A bug in the Linux kernel's network redundancy code can let an attacker who already has access to the machine crash it or potentially take full control until the system is updated.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free in the Linux kernel HSR driver because hsr_get_port_ndev fails to hold the RCU lock during hsr_for_each_port iteration and does not retain a device reference before returning the port net_device, allowing concurrent removal to free the object while the caller still uses it.
Why it matters to the business
Systems relying on HSR for high-availability networking face kernel crashes, potential local privilege escalation, or denial of service; the issue affects industrial control, telecom, and other environments using the Linux kernel's HSR implementation.
How an attack unfolds
An attacker with local access triggers concurrent HSR port operations (add/remove or netdevice events) while hsr_get_port_ndev runs without proper RCU and reference protection, causing the caller to dereference a freed net_device and enabling memory corruption that can be turned into code execution or a crash.
How to fix it
Upgrade the Linux kernel to version 6.12.64 or later, or apply commit 9433ba79c2ec3ec7c9a711748701549339c3438c from the stable git tree; rebuild and reboot with the patched kernel on all affected hosts.
How to confirm the fix worked
Verify the running kernel version is at least 6.12.64, confirm the source tree contains the referenced commit, and inspect hsr_get_port_ndev to ensure rcu_read_lock and dev_hold are acquired before the port iteration and reference return.
Typical attack path
- Obtain local execution on a system using the HSR protocol
- Race HSR port addition/removal operations against calls to hsr_get_port_ndev
- Trigger use-after-free of the net_device structure
- Leverage the resulting memory corruption for privilege escalation or denial of service
How to detect it
Review kernel logs for HSR-related oops, use-after-free warnings, or netdevice reference errors around the time of suspected exploitation; correlate with processes performing HSR configuration changes.
What your security team should do
- Prioritize kernel upgrades on all systems exposing HSR interfaces
- Audit environments for HSR usage and schedule staged rollouts
- Monitor vendor and distribution advisories for backported fixes in older LTS kernels
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:14 | linux | 0 | No fix |
| Linux | Kernel | 0 | 6.12.64 |
| Linux | Kernel | 6.14.0 | 6.16.8 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39884 In the Linux kernel, the following vulnerability has been resolved: btrfs: fix subvolume… Also affects linux
- CVE-2025-39886 In the Linux kernel, the following vulnerability has been resolved: bpf: Tell memcg to… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39880 In the Linux kernel, the following vulnerability has been resolved: libceph: fix invalid… Also affects linux
- CVE-2025-39881 In the Linux kernel, the following vulnerability has been resolved: kernfs: Fix UAF in… Also affects linux
- CVE-2025-39882 In the Linux kernel, the following vulnerability has been resolved: drm/mediatek: fix… Also affects linux