CVE-2024-56644: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: net/ipv6: release expired exception dst cached in socket Dst objects get leaked in ip6_negative_advice() when this function is executed for an expired IPv6 route located in the exception table. There are several conditions that must be fulfilled for the leak to occur: * an ICMPv6 packet indicating a change of the MTU for the path is received, resulting in an exception dst being created * a TCP connection that uses the exception dst for routing packets must start timing out so that TCP begins retransmissions * after the exception dst expires, the FIB6 garbage collector must not run before TCP executes ip6_negative_advice() for the expired exception dst When TCP executes ip6_negative_advice() for an exception dst that has expired and if no other socket holds a reference to the exception dst, the refcount of the exception dst is 2, which corresponds to the increment made by dst_init() and the increment made by the TCP socket for which the connection is timing out. The refcount made by the socket is never released. The refcount of the dst is decremented in sk_dst_reset() but that decrement is counteracted by a dst_hold() intentionally placed just before the sk_dst_reset() in ip6_negative_advice(). After ip6_negative_advice() has finished, there is no other object tied to the dst. The socket lost its reference stored in sk_dst_cache and the dst is no longer in the exception table. The exception dst becomes a leaked object. As a result of this dst leak, an unbalanced refcount is reported for the loopback device of a net namespace being destroyed under kernels that do not contain e5f80fcf869a ("ipv6: give an IPv6 dev to blackhole_netdev"): unregister_netdevice: waiting for lo to become free. Usage count = 2 Fix the dst leak by removing the dst_hold() in ip6_negative_advice(). The patch that introduced the dst_hold() in ip6_negative_advice() was 92f1655aa2b22 ("net: fix __dst_negative_advice() race"). But 92f1655aa2b22 merely refactored the code with regards to the dst refcount so the issue was present even before 92f1655aa2b22. The bug was introduced in 54c1a859efd9f ("ipv6: Don't drop cache route entry unless timer actually expired.") where the expired cached route is deleted and the sk_dst_cache member of the socket is set to NULL by calling dst_negative_advice() but the refcount belonging to the socket is left unbalanced. The IPv4 version - ipv4_negative_advice() - is not affected by this bug. When the TCP connection times out ipv4_negative_advice() merely resets the sk_dst_cache of the socket while decrementing the refcount of the exception dst.
AI Analysis
Technical Summary
CVE-2024-56644 is a vulnerability in the Linux kernel's IPv6 networking stack related to improper reference count management of exception destination (dst) objects cached in sockets. Specifically, the issue occurs in the function ip6_negative_advice(), which is called when an ICMPv6 packet indicates a change in the path MTU, causing an exception dst to be created and cached for routing TCP packets. Under certain conditions—namely, when a TCP connection using this exception dst starts timing out and retransmitting, and the exception dst expires before the FIB6 garbage collector runs—the reference count for the dst object becomes unbalanced. This happens because the socket's reference to the exception dst is never properly released, due to an extra dst_hold() call that counteracts the decrement in sk_dst_reset(). As a result, the exception dst object is leaked, leading to resource leakage and preventing proper cleanup of network namespaces, evidenced by the loopback device usage count remaining elevated during net namespace destruction. The root cause traces back to a code change that refactored dst reference counting but did not fully address the lifecycle management of expired cached routes. Notably, the IPv4 equivalent function ipv4_negative_advice() does not suffer from this bug. The vulnerability does not appear to have known exploits in the wild and affects Linux kernel versions containing the specified commits prior to the fix. The issue primarily impacts systems using IPv6 with TCP connections that experience path MTU changes and retransmissions, potentially causing resource exhaustion or denial of service in network namespace teardown scenarios.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to Linux-based infrastructure that heavily relies on IPv6 networking, which is increasingly common in enterprise and cloud environments. The resource leak caused by unbalanced reference counts can lead to gradual exhaustion of kernel networking resources, potentially resulting in degraded network performance or denial of service conditions, especially in environments that frequently create and destroy network namespaces such as container orchestration platforms (e.g., Kubernetes) or virtualized network functions. This can disrupt critical services, including web servers, application servers, and internal network communications. While the vulnerability does not directly allow remote code execution or privilege escalation, the denial of service impact on network namespaces and loopback devices can affect multi-tenant environments and cloud providers serving European customers. Additionally, the complexity of the conditions required for exploitation means that the impact may be more pronounced in high-throughput or highly dynamic network environments common in large enterprises and service providers in Europe.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel versions to include the patch that removes the extraneous dst_hold() call in ip6_negative_advice(), thereby correcting the reference count imbalance. For environments where immediate patching is not feasible, monitoring kernel logs for warnings related to 'unregister_netdevice: waiting for lo to become free' can help detect potential exploitation or resource leakage. Network administrators should also audit and limit unnecessary ICMPv6 messages that trigger path MTU changes, where possible, to reduce the likelihood of the vulnerability being triggered. In containerized or virtualized environments, careful management of network namespaces and limiting the lifespan of TCP connections that experience retransmissions can mitigate the risk. Additionally, implementing kernel resource monitoring and alerting for abnormal increases in network device usage counts or socket reference counts can provide early warning signs. Finally, organizations should ensure robust IPv6 network configurations and consider fallback or redundancy mechanisms to maintain availability in case of network stack degradation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Norway, Denmark, Belgium, Italy
CVE-2024-56644: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: net/ipv6: release expired exception dst cached in socket Dst objects get leaked in ip6_negative_advice() when this function is executed for an expired IPv6 route located in the exception table. There are several conditions that must be fulfilled for the leak to occur: * an ICMPv6 packet indicating a change of the MTU for the path is received, resulting in an exception dst being created * a TCP connection that uses the exception dst for routing packets must start timing out so that TCP begins retransmissions * after the exception dst expires, the FIB6 garbage collector must not run before TCP executes ip6_negative_advice() for the expired exception dst When TCP executes ip6_negative_advice() for an exception dst that has expired and if no other socket holds a reference to the exception dst, the refcount of the exception dst is 2, which corresponds to the increment made by dst_init() and the increment made by the TCP socket for which the connection is timing out. The refcount made by the socket is never released. The refcount of the dst is decremented in sk_dst_reset() but that decrement is counteracted by a dst_hold() intentionally placed just before the sk_dst_reset() in ip6_negative_advice(). After ip6_negative_advice() has finished, there is no other object tied to the dst. The socket lost its reference stored in sk_dst_cache and the dst is no longer in the exception table. The exception dst becomes a leaked object. As a result of this dst leak, an unbalanced refcount is reported for the loopback device of a net namespace being destroyed under kernels that do not contain e5f80fcf869a ("ipv6: give an IPv6 dev to blackhole_netdev"): unregister_netdevice: waiting for lo to become free. Usage count = 2 Fix the dst leak by removing the dst_hold() in ip6_negative_advice(). The patch that introduced the dst_hold() in ip6_negative_advice() was 92f1655aa2b22 ("net: fix __dst_negative_advice() race"). But 92f1655aa2b22 merely refactored the code with regards to the dst refcount so the issue was present even before 92f1655aa2b22. The bug was introduced in 54c1a859efd9f ("ipv6: Don't drop cache route entry unless timer actually expired.") where the expired cached route is deleted and the sk_dst_cache member of the socket is set to NULL by calling dst_negative_advice() but the refcount belonging to the socket is left unbalanced. The IPv4 version - ipv4_negative_advice() - is not affected by this bug. When the TCP connection times out ipv4_negative_advice() merely resets the sk_dst_cache of the socket while decrementing the refcount of the exception dst.
AI-Powered Analysis
Technical Analysis
CVE-2024-56644 is a vulnerability in the Linux kernel's IPv6 networking stack related to improper reference count management of exception destination (dst) objects cached in sockets. Specifically, the issue occurs in the function ip6_negative_advice(), which is called when an ICMPv6 packet indicates a change in the path MTU, causing an exception dst to be created and cached for routing TCP packets. Under certain conditions—namely, when a TCP connection using this exception dst starts timing out and retransmitting, and the exception dst expires before the FIB6 garbage collector runs—the reference count for the dst object becomes unbalanced. This happens because the socket's reference to the exception dst is never properly released, due to an extra dst_hold() call that counteracts the decrement in sk_dst_reset(). As a result, the exception dst object is leaked, leading to resource leakage and preventing proper cleanup of network namespaces, evidenced by the loopback device usage count remaining elevated during net namespace destruction. The root cause traces back to a code change that refactored dst reference counting but did not fully address the lifecycle management of expired cached routes. Notably, the IPv4 equivalent function ipv4_negative_advice() does not suffer from this bug. The vulnerability does not appear to have known exploits in the wild and affects Linux kernel versions containing the specified commits prior to the fix. The issue primarily impacts systems using IPv6 with TCP connections that experience path MTU changes and retransmissions, potentially causing resource exhaustion or denial of service in network namespace teardown scenarios.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to Linux-based infrastructure that heavily relies on IPv6 networking, which is increasingly common in enterprise and cloud environments. The resource leak caused by unbalanced reference counts can lead to gradual exhaustion of kernel networking resources, potentially resulting in degraded network performance or denial of service conditions, especially in environments that frequently create and destroy network namespaces such as container orchestration platforms (e.g., Kubernetes) or virtualized network functions. This can disrupt critical services, including web servers, application servers, and internal network communications. While the vulnerability does not directly allow remote code execution or privilege escalation, the denial of service impact on network namespaces and loopback devices can affect multi-tenant environments and cloud providers serving European customers. Additionally, the complexity of the conditions required for exploitation means that the impact may be more pronounced in high-throughput or highly dynamic network environments common in large enterprises and service providers in Europe.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel versions to include the patch that removes the extraneous dst_hold() call in ip6_negative_advice(), thereby correcting the reference count imbalance. For environments where immediate patching is not feasible, monitoring kernel logs for warnings related to 'unregister_netdevice: waiting for lo to become free' can help detect potential exploitation or resource leakage. Network administrators should also audit and limit unnecessary ICMPv6 messages that trigger path MTU changes, where possible, to reduce the likelihood of the vulnerability being triggered. In containerized or virtualized environments, careful management of network namespaces and limiting the lifespan of TCP connections that experience retransmissions can mitigate the risk. Additionally, implementing kernel resource monitoring and alerting for abnormal increases in network device usage counts or socket reference counts can provide early warning signs. Finally, organizations should ensure robust IPv6 network configurations and consider fallback or redundancy mechanisms to maintain availability in case of network stack degradation.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-27T15:00:39.840Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9820c4522896dcbdd0f7
Added to database: 5/21/2025, 9:08:48 AM
Last enriched: 6/27/2025, 10:40:35 PM
Last updated: 8/11/2025, 3:07:19 AM
Views: 15
Related Threats
CVE-2025-52621: CWE-346 Origin Validation Error in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52620: CWE-20 Improper Input Validation in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52619: CWE-209 Generation of Error Message Containing Sensitive Information in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52618: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in HCL Software BigFix SaaS Remediate
MediumCVE-2025-43201: An app may be able to unexpectedly leak a user's credentials in Apple Apple Music Classical for Android
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.