CVE-2025-22021: netfilter: socket: Lookup orig tuple for IPv6 SNAT
In the Linux kernel, the following vulnerability has been resolved:
netfilter: socket: Lookup orig tuple for IPv6 SNAT
nfsklookupslowv4 does the conntrack lookup for IPv4 packets to restore the original 5-tuple in case of SNAT, to be able to find the right socket (if any). Then socketmatch() can correctly check whether the socket was transparent.
However, the IPv6 counterpart (nfsklookupslowv6) lacks this conntrack lookup, making xtsocket fail to match on the socket when the packet was SNATed. Add the same logic to nfsklookupslowv6.
IPv6 SNAT is used in Kubernetes clusters for pod-to-world packets, as pods' addresses are in the fd00::/8 ULA subnet and need to be replaced with the node's external address. Cilium leverages Envoy to enforce L7 policies, and Envoy uses transparent sockets. Cilium inserts an iptables prerouting rule that matches on -m socket --transparent and redirects the packets to localhost, but it fails to match SNATed IPv6 packets due to that missing conntrack lookup.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-22021?
CVE-2025-22021 has been classified as a moderate severity vulnerability in the Linux kernel.
How do I fix CVE-2025-22021?
To mitigate CVE-2025-22021, you should update to the latest patched version of the Linux kernel.
What type of vulnerability is CVE-2025-22021?
CVE-2025-22021 is a networking vulnerability related to the netfilter subsystem in the Linux kernel.
Which systems are affected by CVE-2025-22021?
CVE-2025-22021 affects systems running the Linux kernel with conntrack support enabled.
When was CVE-2025-22021 disclosed?
CVE-2025-22021 was disclosed as part of a series of fixes related to networking in the Linux kernel.