CVE-2024-56644

net/ipv6: release expired exception dst cached in socket

MEDIUM
5.5
CVSS Score
Published: December 27, 2024 at 03:02 PM UTC
Updated: October 15, 2026 at 10:18 PM UTC
2 products affected across 2 vendorsLinux KernelDebian Linux

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.7%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.33.2 ≤ v < 2.6.342.6.34.1 ≤ v < 5.4.2875.11 ≤ v < 5.15.1745.16 ≤ v < 6.1.1205.5 ≤ v < 5.10.2316.2 ≤ v < 6.6.666.7 ≤ v < 6.12.52.6.33.22.6.342.6.34 rc32.6.34 rc42.6.34 rc52.6.34 rc62.6.34 rc754c1a859efd9fd6cda05bc700315ba2519c14eba6.136.13 rc19c93e9c757c7d3d96027a06b9b4c4e37ca87ded7
Vendor states this is fixed in 0b8903e6c881f72c6849d4952de742c656eb5ab9 (fixed)
Vendor states this is fixed in 3301ab7d5aeb0fe270f73a3d4810c9d1b6a9f045 (fixed)
Vendor states this is fixed in 535add1e9f274502209cb997801208bbe1ae6c6f (fixed)
Vendor states this is fixed in 8b591bd522b71c42a82898290e35d32b482047e4 (fixed)
Vendor states this is fixed in a95808252e8acc0123bacd2dff8b9af10bc145b7 (fixed)
Vendor states this is fixed in b90d061345bb8cd51fece561a800bae1c95448a6 (fixed)
Vendor states this is fixed in f43d12fd0fa8ee5b9caf8a3927e10d06431764d2 (fixed)
Vendor states this is fixed in 2.6.34 (unaffected)
Vendor states this is fixed in 5.10.231 (unaffected)
Vendor states this is fixed in 5.15.174 (unaffected)
Vendor states this is fixed in 5.4.287 (unaffected)
Vendor states this is fixed in 6.1.120 (unaffected)
Vendor states this is fixed in 6.12.5 (unaffected)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.6.66 (unaffected)

References (11)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0b8903e6c881f72c6849d4952de742c656eb5ab9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3301ab7d5aeb0fe270f73a3d4810c9d1b6a9f045
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/535add1e9f274502209cb997801208bbe1ae6c6f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8b591bd522b71c42a82898290e35d32b482047e4
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a95808252e8acc0123bacd2dff8b9af10bc145b7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b90d061345bb8cd51fece561a800bae1c95448a6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f43d12fd0fa8ee5b9caf8a3927e10d06431764d2
Third Party Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card