KernelScan.io

HIGH Introduced in 4.15

ipv6 ExceptionCache Leak

CVE-2026-99076

CVSS 7.5 / 10.0 KernelScan AI

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

01

In the Linux kernel, the following vulnerability has been resolved: ipv6: udp: Create exceptions before socket matching Currently, when ICMPv6 Packet Too Big and Redirect Message packets are locally delivered and quote a UDP packet, an exception is only created in the IPv6 exception cache if the kernel can match the UDP packet to an existing socket. This behavior allows off-path attackers to conduct a side-channel attack on the exception cache in order to discover the ephemeral port used by a connected UDP socket. Commit 4785305c05b2 ("ipv6: use siphash in rt6_exception_hash()") and commit a00df2caffed ("ipv6: make exception cache less predictible") tried to mitigate such attacks by making it harder for attackers to discover hash collisions in the exception cache and by randomizing the number of exceptions a hash bucket can hold, respectively. Unfortunately, both of the mitigations can be bypassed. Instead, mitigate such attacks by always creating an exception, even before trying to find a matching socket. Do that by calling ip6_update_pmtu() and ip6_redirect(), the helpers used when the quoted packet did not originate from a socket. This means that guesses (right or wrong) from an off-path attacker will always result in an exception being created or updated in the cache that the attacker can observe. Pass the ifindex of the ingress device and the default uid, in a similar fashion to icmpv6_err(). Unlike IPv4, an oif of 0 would not match any nexthop in ip6_redirect_nh_match() and no exception would be created in response to a Redirect Message. Note that this does not allow attackers to create exceptions that they could not create before, as both helpers can already be reached with little to no validation. For example, by sending an ICMPv6 error that quotes an ICMPv6 Echo Reply or one that quotes a UDP source port that matches a wildcard socket. Also note that in the good case (matched socket) the above scheme comes at the cost of an extra route lookup, as the no socket helpers perform their own lookup before the one performed by ip6_sk_update_pmtu() / ip6_sk_redirect(). When the two resolve to different nexthops, it also results in two exceptions being created for the same destination IP. One in the exception cache of the nexthop resolved by the no socket helpers and another in the exception cache of the nexthop used by the socket.

02

Engine v0.9.0

Risk summary

An off-path attacker can send spoofed ICMPv6 Packet Too Big or Redirect messages to discover the ephemeral port of a connected UDP socket by observing whether the IPv6 exception cache is updated. This enables UDP hijacking and related attacks against any IPv6-enabled system reachable over the network.

Affectednet/ipv6/udp.c (IPv6 UDP error handling)

Vulnerability analysis

When the kernel processes an ICMPv6 error message that quotes a UDP packet, it used to create a routing exception only when the quoted packet matched an active UDP socket. This behavioral difference let an off-path attacker probe the exception cache by sending spoofed ICMPv6 errors with guessed UDP ports and observing side effects such as timing or cache state, thereby discovering which ephemeral ports were in use. The fix makes the kernel always create or update an exception by invoking the socket-independent helpers before any socket lookup, removing the observable distinction between a correct and incorrect port guess. The flaw is exploitable from any network location capable of delivering IPv6 packets to the target; no local access, privileges, or user interaction are needed.

03

BranchIntroducedFixed inPatch commit
6.14.156.1.19326eaa8c6a6c2
6.124.156.12.1179b88f0fcbd4b
6.184.156.18.61fc1fc874ceed
6.64.156.6.163128d11b1281f
7.24.157.2.118c9b310c958b
mainline4.157.3ac76cab50e89
cip/6.124.156.12.117-cip359b88f0fcbd4b

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.117-cip35
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip137)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip137-rt51)