🇰🇷 한글 설명
리눅스 커널의 netfilter IPv6 SNAT 처리 과정에서 conntrack 조회 로직이 누락되어 발생하는 취약점입니다. 이로 인해 IPv6 SNAT가 적용된 패킷에 대해 xt_socket 모듈이 소켓 일치 여부를 올바르게 확인하지 못하는 문제가 발생합니다.
💡 쉬운 설명
IPv6 주소를 변환하는 과정에서 시스템이 원래의 정보를 제대로 찾지 못해 보안 규칙이 제대로 작동하지 않을 수 있습니다. 특히 쿠버네티스 환경에서 네트워크 정책이 의도대로 적용되지 않을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: socket: Lookup orig tuple for IPv6 SNAT
nf_sk_lookup_slow_v4 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 socket_match() can correctly check whether
the socket was transparent.
However, the IPv6 counterpart (nf_sk_lookup_slow_v6) lacks this
conntrack lookup, making xt_socket fail to match on the socket when the
packet was SNATed. Add the same logic to nf_sk_lookup_slow_v6.
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.
📍 영향받는 시스템
IPv6 SNAT 및 transparent socket을 사용하는 Linux Kernel (특히 Cilium/Kubernetes 환경)
⚔️ 공격 벡터
네트워크 정책 우회 (SNAT된 IPv6 패킷이 보안 규칙을 통과할 수 있음)
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 리눅스 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 패치가 적용된 배포판의 수정 버전인지 확인하십시오.