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.
- Configuration
Flush all routes (use fib_table_flush() with flush_all=true) so that error routes are flushed when their nexthop is marked dead, preventing the nexthop reference-count leak in fib_table_flush() logic.
Linux kernel fib_table_flush()/route flushing flush_all = true - Compensating control
Use IPv6 instead of IPv4 for affected routing paths, since the material states IPv6 does not suffer from this problem.
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.