CVE-2026-143202: udp: do not use a cross-family sk_rx_dst in early demux
In the Linux kernel, the following vulnerability has been resolved:
udp: do not use a cross-family skrxdst in early demux
A dual-stack UDP socket connected to a v4-mapped address can receive both IPv4 packets and IPv6 packets using v4-mapped addresses: ip6rcvcore() no longer rejects a v4-mapped source since commit dcc32f4f183a ("ipv6: weaken the v4mapped source check"), which kept that check only in tcpv6connrequest(). ipv6portaddrhash() hashes v4-mapped addresses like IPv4 ones, so both early demux handlers find the socket, and both udp4librcv() and udp6librcv() store their input dst in the same sk->skrxdst.
udpv6earlydemux() validates the cached dst with dstcheck(), but ipv4dstcheck() ignores the cookie, so an IPv4 dst gets attached to an IPv6 skb. ip6rcvfinishcore() then skips the route lookup and iplocaldeliver() parses the IPv6 header as an IPv4 one: the IPv6 next header and hop limit are read as a fragment offset, and the IPv4 protocol is taken from a source address byte.
The reverse direction looks possible too: per-cpu dsts of IPv6 routes using nexthop objects have rt->sernum set, and ip6dstcheck() then ignores the cookie, so udpv4earlydemux() can attach an IPv6 dst to an IPv4 skb.
Kyle Zeng reported that such a packet can reach XFRM input still holding the prefetched, non refcounted, socket set by early demux, which can then outlive its RCU grace period.
Only use the cached dst if its family matches the packet. Otherwise fall back to a regular route lookup.
TCP does not have the same problem: skehashfn() hashes a v4-mapped socket with inetehashfn(), while IPv6 lookups use inet6ehashfn(), so IPv6 packets do not normally find a v4-mapped TCP socket.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using dual-stack UDP sockets connected to IPv4-mapped addresses are exposed when those sockets can receive both IPv4 traffic and IPv6 traffic using IPv4-mapped addresses. Both IPv4 and IPv6 early-demultiplexing handlers can locate the same socket.
What traffic condition can trigger the faulty path?
The issue requires cross-family packet handling for the same dual-stack UDP socket: an IPv4 destination-route cache can be reused for an IPv6 packet, or the reverse direction may occur. This can cause the receiving stack to skip route lookup and process an IPv6 header as though it were an IPv4 header.