🇰🇷 한글 설명
Linux 커널의 Open vSwitch(OVS) 구성 요소에서 ICMPv6 패킷 처리 시 conntrack의 원본 튜플 데이터를 덮어쓰는 취약점이 발견되었습니다. ICMPv6 패킷 파싱 과정에서 Neighbor Discovery(ND) 필드를 초기화할 때, 메모리 공유 구조로 인해 기존의 연결 추적(conntrack) 메타데이터가 손상될 수 있습니다. 이로 인해 잘못된 패킷 매칭이 발생하거나 데이터패스 재순환 시 의도치 않은 동작이 실행될 위험이 있습니다.
💡 쉬운 설명
네트워크 통신을 관리하는 소프트웨어에서 특정 종류의 메시지(ICMPv6)를 처리할 때, 기존의 중요한 연결 정보를 실수로 지워버리는 버그입니다. 이로 인해 네트워크 데이터가 엉뚱한 곳으로 전달되거나 보안 규칙이 제대로 작동하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: openvswitch: fix overwriting ct original tuple for ICMPv6
OVS_PACKET_CMD_EXECUTE has 3 main attributes:
- OVS_PACKET_ATTR_KEY - Packet metadata in a netlink format.
- OVS_PACKET_ATTR_PACKET - Binary packet content.
- OVS_PACKET_ATTR_ACTIONS - Actions to execute on the packet.
OVS_PACKET_ATTR_KEY is parsed first to populate sw_flow_key structure
with the metadata like conntrack state, input port, recirculation id,
etc. Then the packet itself gets parsed to populate the rest of the
keys from the packet headers.
Whenever the packet parsing code starts parsing the ICMPv6 header, it
first zeroes out fields in the key corresponding to Neighbor Discovery
information even if it is not an ND packet.
It is an 'ipv6.nd' field. However, the 'ipv6' is a union that shares
the space between 'nd' and 'ct_orig' that holds the original tuple
conntrack metadata parsed from the OVS_PACKET_ATTR_KEY.
ND packets should not normally have conntrack state, so it's fine to
share the space, but normal ICMPv6 Echo packets or maybe other types of
ICMPv6 can have the state attached and it should not be overwritten.
The issue results in all but the last 4 bytes of the destination
address being wiped from the original conntrack tuple leading to
incorrect packet matching and potentially executing wrong actions
in case this packet recirculates within the datapath or goes back
to userspace.
ND fields should not be accessed in non-ND packets, so not clearing
them should be fine. Executing memset() only for actual ND packets to
avoid the issue.
Initializing the whole thing before parsing is needed because ND packet
may not contain all the options.
The issue only affects the OVS_PACKET_CMD_EXECUTE path and doesn't
affect packets entering OVS datapath from network interfaces, because
in this case CT metadata is populated from skb after the packet is
already parsed.
📍 영향받는 시스템
Open vSwitch(OVS)를 사용하는 Linux 커널 시스템 (OVS_PACKET_CMD_EXECUTE 경로 사용 시)
⚔️ 공격 벡터
OVS 데이터패스 내에서 패킷이 재순환(recirculation)되거나 사용자 공간으로 전달될 때 조작된 ICMPv6 패킷을 통해 발생
🛡️ 대응 방법
ICMPv6 패킷 파싱 시 ND 패킷인 경우에만 필드를 초기화하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인