CVE-2024-56644: net/ipv6: release expired exception dst cached in socket

Published Dec 27, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

net/ipv6: release expired exception dst cached in socket

Dst objects get leaked in ip6negativeadvice() 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 ip6negativeadvice() for the expired exception dst

When TCP executes ip6negativeadvice() 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 dstinit() 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 skdstreset() but that decrement is counteracted by a dsthold() intentionally placed just before the skdstreset() in ip6negativeadvice(). After ip6negativeadvice() has finished, there is no other object tied to the dst. The socket lost its reference stored in skdstcache 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 blackholenetdev"): unregisternetdevice: waiting for lo to become free. Usage count = 2

Fix the dst leak by removing the dsthold() in ip6negativeadvice(). The patch that introduced the dsthold() in ip6negativeadvice() was 92f1655aa2b22 ("net: fix dstnegativeadvice() 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 skdstcache member of the socket is set to NULL by calling dstnegativeadvice() but the refcount belonging to the socket is left unbalanced.

The IPv4 version - ipv4negativeadvice() - is not affected by this bug. When the TCP connection times out ipv4negativeadvice() merely resets the skdstcache of the socket while decrementing the refcount of the exception dst.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

18 affected componentsFixes available
Linux Linux kernel>54c1a859efd9f
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=2.6.33.2<2.6.34
Linux Linux kernel>=2.6.34.1<5.4.287
Linux Linux kernel>=5.5<5.10.231
Linux Linux kernel>=5.11<5.15.174
Linux Linux kernel>=5.16<6.1.120
Linux Linux kernel>=6.2<6.6.66
Linux Linux kernel>=6.7<6.12.5
Linux Linux kernel=2.6.34
Linux Linux kernel=2.6.34-rc3
Linux Linux kernel=2.6.34-rc4
Linux Linux kernel=2.6.34-rc5
Linux Linux kernel=2.6.34-rc6
Linux Linux kernel=2.6.34-rc7
Linux Linux kernel=6.13-rc1
Debian Debian Linux=11.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 54c1a859efd9f
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 92f1655aa2b22
  5. Configuration

    Fix the IPv6 exception dst leak by removing the dst_hold() in ip6_negative_advice(), which resolves the unbalanced dst refcount when an expired exception dst cached in a socket is released.

    Linux kernel net/ipv6 (ip6_negative_advice) dst_hold() call in ip6_negative_advice() = remove dst_hold()

Event History

Dec 27, 2024
CVE Published
via MITRE·03:02 PM
Data Sourced
via MITRE·03:02 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
Description
Data Sourced
via NVD·03:15 PM
RemedySeverityAffected Software
Data Sourced
via Red Hat·04:02 PM
DescriptionSeverityAffected Software
Mar 27, 2025
Data Sourced
via Launchpad·06:46 PM
Description
Apr 28, 2025
Data Sourced
via Ubuntu·06:53 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-56644?

CVE-2024-56644 is rated as a moderate severity vulnerability due to potential memory leaks in the Linux kernel.

2

How do I fix CVE-2024-56644?

To fix CVE-2024-56644, you should update the Linux kernel to a version that includes the patch for this vulnerability.

3

What vulnerabilities are associated with CVE-2024-56644?

CVE-2024-56644 is associated with a vulnerability that can cause memory leaks when handling expired IPv6 routes in socket operations.

4

Which software versions are affected by CVE-2024-56644?

CVE-2024-56644 affects specific versions of the Linux kernel prior to the patch release.

5

What causes the issue in CVE-2024-56644?

The issue in CVE-2024-56644 is caused by leaked dst objects in the ip6_negative_advice() function when dealing with expired IPv6 routes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203