{"id":"CVE-2026-143202","summary":"udp: do not use a cross-family sk_rx_dst in early demux","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nudp: do not use a cross-family sk_rx_dst in early demux\n\nA dual-stack UDP socket connected to a v4-mapped address can receive\nboth IPv4 packets and IPv6 packets using v4-mapped addresses:\nip6_rcv_core() no longer rejects a v4-mapped source since commit\ndcc32f4f183a (\"ipv6: weaken the v4mapped source check\"), which kept\nthat check only in tcp_v6_conn_request(). ipv6_portaddr_hash() hashes\nv4-mapped addresses like IPv4 ones, so both early demux handlers find\nthe socket, and both __udp4_lib_rcv() and __udp6_lib_rcv() store their\ninput dst in the same sk-\u003esk_rx_dst.\n\nudp_v6_early_demux() validates the cached dst with dst_check(), but\nipv4_dst_check() ignores the cookie, so an IPv4 dst gets attached to\nan IPv6 skb. ip6_rcv_finish_core() then skips the route lookup and\nip_local_deliver() parses the IPv6 header as an IPv4 one: the IPv6\nnext header and hop limit are read as a fragment offset, and the IPv4\nprotocol is taken from a source address byte.\n\nThe reverse direction looks possible too: per-cpu dsts of IPv6 routes\nusing nexthop objects have rt-\u003esernum set, and ip6_dst_check() then\nignores the cookie, so udp_v4_early_demux() can attach an IPv6 dst to\nan IPv4 skb.\n\nKyle Zeng reported that such a packet can reach XFRM input still\nholding the prefetched, non refcounted, socket set by early demux,\nwhich can then outlive its RCU grace period.\n\nOnly use the cached dst if its family matches the packet. Otherwise\nfall back to a regular route lookup.\n\nTCP does not have the same problem: sk_ehashfn() hashes a v4-mapped\nsocket with inet_ehashfn(), while IPv6 lookups use inet6_ehashfn(),\nso IPv6 packets do not normally find a v4-mapped TCP socket.","modified":"2026-12-03T11:01:41.882478602Z","published":"2026-12-03T09:20:26.981Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143202.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5636e67320563be743d47706ef4914078c27edb2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5e8fc192a32a6efc32e671ba9ee7de47ee7e1f24"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5f348bea3aade4b87133b297c5a0ba82fffaa218"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5ff1407d5f901969e1f457c8ae066af880294864"},{"type":"WEB","url":"https://git.kernel.org/stable/c/62c831858402dca6db4da78e1afc6e507cfdcdcb"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143202.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143202"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5425077d73e0c8e7e9267ca8397cc0e2293c1fb9"},{"fixed":"5ff1407d5f901969e1f457c8ae066af880294864"},{"fixed":"5e8fc192a32a6efc32e671ba9ee7de47ee7e1f24"},{"fixed":"5f348bea3aade4b87133b297c5a0ba82fffaa218"},{"fixed":"62c831858402dca6db4da78e1afc6e507cfdcdcb"},{"fixed":"5636e67320563be743d47706ef4914078c27edb2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143202.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.12.0"},{"fixed":"5.15.227"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143202.json"}}],"schema_version":"1.9.2"}