CVE-2025-71097: ipv4: Fix reference count leak when using error routes with nexthop objects
In the Linux kernel, the following vulnerability has been resolved:
ipv4: Fix reference count leak when using error routes with nexthop objects
When a nexthop object is deleted, it is marked as dead and then fibtableflush() is called to flush all the routes that are using the dead nexthop.
The current logic in fibtableflush() is to only flush error routes (e.g., blackhole) when it is called as part of network namespace dismantle (i.e., with flushall=true). Therefore, error routes are not flushed when their nexthop object is deleted:
# ip link add name dummy1 up type dummy # ip nexthop add id 1 dev dummy1 # ip route add 198.51.100.1/32 nhid 1 # ip route add blackhole 198.51.100.2/32 nhid 1 # ip nexthop del id 1 # ip route show blackhole 198.51.100.2 nhid 1 dev dummy1
As such, they keep holding a reference on the nexthop object which in turn holds a reference on the nexthop device, resulting in a reference count leak:
# ip link del dev dummy1 [ 70.516258] unregisternetdevice: waiting for dummy1 to become free. Usage count = 2
Fix by flushing error routes when their nexthop is marked as dead.
IPv6 does not suffer from this problem.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Compensating control
Flush IPv4 error routes, such as blackhole routes, when their nexthop object is marked dead or deleted, preventing the routes from retaining references to the nexthop and device.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-71097?
CVE-2025-71097 has a low severity rating due to its nature of causing a reference count leak.
How do I fix CVE-2025-71097?
The recommended fix for CVE-2025-71097 is to update to the latest version of the Linux kernel that addresses this vulnerability.
What are the potential impacts of CVE-2025-71097?
The primary impact of CVE-2025-71097 is a potential memory leak affecting system performance over time.
Which systems are affected by CVE-2025-71097?
CVE-2025-71097 affects systems running vulnerable versions of the Linux kernel utilizing nexthop objects.
Is CVE-2025-71097 being actively exploited?
As of now, there are no reported active exploits specifically targeting CVE-2025-71097.