🇰🇷 한글 설명
Linux 커널의 IPv6 ICMP 처리 과정에서 skb->cb[] 데이터가 적절히 초기화되지 않아 발생하는 취약점입니다. 공격자가 조작된 IPv4 ICMP 오류 패킷을 보내면, IPv4 파라미터가 IPv6 파라미터로 잘못 해석되어 메모리 경계를 벗어나는 읽기 또는 쓰기가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 통신 중 발생하는 오류 메시지를 처리할 때, 컴퓨터가 이전 데이터의 흔적을 잘못 읽어 발생하는 문제입니다. 이를 통해 해커가 시스템의 중요한 메모리 영역에 접근하거나 조작을 시도할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ipv6: icmp: clear skb2->cb[] in ip6_err_gen_icmpv6_unreach()
Sashiko AI-review observed:
In ip6_err_gen_icmpv6_unreach(), the skb is an outer IPv4 ICMP error packet
where its cb contains an IPv4 inet_skb_parm. When skb is cloned into skb2
and passed to icmp6_send(), it uses IP6CB(skb2).
IP6CB interprets the IPv4 inet_skb_parm as an inet6_skb_parm. The cipso
offset in inet_skb_parm.opt directly overlaps with dsthao in inet6_skb_parm
at offset 18.
If an attacker sends a forged ICMPv4 error with a CIPSO IP option, dsthao
would be a non-zero offset. Inside icmp6_send(), mip6_addr_swap() is called
and uses ipv6_find_tlv(skb, opt->dsthao, IPV6_TLV_HAO).
This would scan the inner, attacker-controlled IPv6 packet starting at that
offset, potentially returning a fake TLV without checking if the remaining
packet length can hold the full 18-byte struct ipv6_destopt_hao.
Could mip6_addr_swap() then perform a 16-byte swap that extends past the end
of the packet data into skb_shared_info?
Should the cb array also be cleared in ip6_err_gen_icmpv6_unreach() and
ip6ip6_err() to prevent this?
This patch implements the first suggestion.
I am not sure if ip6ip6_err() needs to be changed.
A separate patch would be better anyway.
📍 영향받는 시스템
IPv6 및 ICMP 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 CIPSO IP 옵션이 포함된 IPv4 ICMP 오류 패킷 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.