🇰🇷 한글 설명
Linux 커널의 io_uring 네트워크 모듈에서, IPv6 연결 시 주소 길이가 24바이트(SIN6_LEN_RFC2133)일 때 BPF 연결 필터가 포트와 주소 필드를 채우지 않아 필터 정책이 우회될 수 있는 취약점입니다. 임계값을 28바이트에서 24바이트로 수정하여 해결되었습니다.
💡 쉬운 설명
관리자가 특정 IPv6 포트나 주소로의 연결을 차단해도, 일부 짧은 형식의 주소 요청으로 이 차단을 우회할 수 있습니다. 커널 업데이트로 이 문제가 수정됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
io_uring/net: populate CONNECT filter fields for 24-byte sockaddr_in6
io_connect_bpf_populate() fills connect.port and connect.v6_addr for
AF_INET6 only when addr_len >= sizeof(struct sockaddr_in6), i.e. 28
bytes.
The IPv6 connect paths accept SIN6_LEN_RFC2133 (24 bytes), which
already holds sin6_port and sin6_addr. io_connect() passes addr_len to
the socket layer unchanged.
At addr_len 24 the filter sees family AF_INET6 with port and address
zero, while the kernel connects to the real destination. A filter that
denies an IPv6 port or address is bypassed. Denying connect.port == P
rejects [::1]:P with -EACCES at addr_len 28 but connects at addr_len 24.
Use SIN6_LEN_RFC2133 as the threshold. sin6_scope_id stays zero when
absent.
The threshold mismatch was found by an AI coding assistant (Claude Code)
comparing this hook against the net/ipv6 length checks on my
instructions; it also drafted the reproducer and this patch. I verified
the bypass and the fix in a VM on 7.3-rc6 and that 7.2 has the same
code.
📍 영향받는 시스템
io_uring 연결 필터(BPF connect 필터)를 사용하는 Linux 커널 7.2 및 7.3-rc6 등 해당 코드가 포함된 버전
⚔️ 공격 벡터
24바이트 길이의 sockaddr_in6 구조체로 io_uring CONNECT 작업을 요청하여 BPF 필터의 IPv6 포트/주소 검사를 우회
🛡️ 대응 방법
패치가 포함된 최신 Linux 커널 버전으로 업데이트하고 시스템을 재부팅
🔧 검증 코드
출력된 커널 버전이 패치가 포함된 버전 이상인지 배포판 보안 공지 또는 커널 changelog와 대조하여 확인하며, 해당 패치 이전 버전이면 취약한 것으로 판단합니다.