Skip to main content

CVE-2025-22005: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2025-22005cvecve-2025-22005
Published: Thu Apr 03 2025 (04/03/2025, 07:19:06 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw(). fib_check_nh_v6_gw() expects that fib6_nh_init() cleans up everything when it fails. Commit 7dd73168e273 ("ipv6: Always allocate pcpu memory in a fib6_nh") moved fib_nh_common_init() before alloc_percpu_gfp() within fib6_nh_init() but forgot to add cleanup for fib6_nh->nh_common.nhc_pcpu_rth_output in case it fails to allocate fib6_nh->rt6i_pcpu, resulting in memleak. Let's call fib_nh_common_release() and clear nhc_pcpu_rth_output in the error path. Note that we can remove the fib6_nh_release() call in nh_create_ipv6() later in net-next.git.

AI-Powered Analysis

AILast updated: 06/30/2025, 11:44:03 UTC

Technical Analysis

CVE-2025-22005 is a memory leak vulnerability identified in the Linux kernel's IPv6 networking stack, specifically within the function fib_check_nh_v6_gw(). This function is responsible for validating next-hop gateways for IPv6 routing. The vulnerability arises due to improper cleanup of per-CPU memory allocations when an error occurs during the initialization of fib6_nh structures. A recent code change (commit 7dd73168e273) reordered the initialization sequence by moving fib_nh_common_init() before alloc_percpu_gfp() in fib6_nh_init(), but failed to add corresponding cleanup logic for the nhc_pcpu_rth_output resource if the allocation of rt6i_pcpu fails. This omission results in a memory leak as allocated per-CPU memory is not freed on failure paths. While this does not directly lead to remote code execution or privilege escalation, the leak can cause gradual resource exhaustion on affected systems, potentially degrading network stack performance or causing denial of service over time. The vulnerability affects Linux kernel versions containing the specified commit and related code paths. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The fix involves invoking fib_nh_common_release() to properly release allocated resources on error paths, ensuring no memory leaks occur during IPv6 next-hop initialization failures.

Potential Impact

For European organizations relying heavily on Linux-based infrastructure, especially those operating IPv6-enabled networks, this vulnerability could lead to gradual memory exhaustion on critical network nodes such as routers, firewalls, and servers. Over time, this may degrade network performance or cause service interruptions, impacting availability. Organizations with large-scale deployments or high network traffic volumes are more susceptible to experiencing noticeable effects. While the vulnerability does not appear to allow direct remote exploitation or data compromise, the resulting denial of service conditions could disrupt business operations, particularly in sectors like telecommunications, finance, and critical infrastructure where uptime and network reliability are paramount. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to potential future exploitation or cascading failures under heavy load.

Mitigation Recommendations

European organizations should prioritize applying the official Linux kernel patches that address this memory leak as soon as they become available. Specifically, updating to kernel versions that include the fix for CVE-2025-22005 will ensure proper cleanup of per-CPU memory allocations during IPv6 next-hop initialization failures. Network administrators should monitor system memory usage and kernel logs for anomalies related to fib6_nh structures or IPv6 routing failures. Implementing proactive resource monitoring and alerting can help detect early signs of memory leaks. Additionally, organizations should conduct thorough testing of kernel updates in staging environments to verify stability and compatibility before deployment. For critical systems, consider deploying redundant network paths or failover mechanisms to mitigate potential service degradation during patching or in case of memory exhaustion. Maintaining an up-to-date inventory of Linux kernel versions in use across the organization will facilitate targeted patch management. Finally, engaging with Linux vendor support channels can provide timely information on patch availability and best practices.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.803Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe8ed7

Added to database: 5/21/2025, 9:09:07 AM

Last enriched: 6/30/2025, 11:44:03 AM

Last updated: 8/15/2025, 8:43:30 AM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats