🇰🇷 한글 설명
Zephyr OS의 IPv6 이웃 탐색(Neighbor Discovery) 과정에서 패킷 전송 후 통계 데이터를 업데이트할 때 이미 해제된 메모리 블록에 접근하는 Use-After-Free 취약점이 발견되었습니다. 공격자가 ICMPv6 Neighbor Solicitation 패킷을 전송하면 시스템의 통계 데이터가 손상되거나, 서비스 거부(DoS) 또는 메모리 오염이 발생할 수 있습니다.
💡 쉬운 설명
네트워크 통계를 기록하는 과정에서 이미 사용이 끝난 메모리 공간을 다시 건드려 발생하는 오류입니다. 이를 통해 시스템이 갑자기 멈추거나 오작동할 수 있습니다.
🇺🇸 원문 (English)
Zephyr's IPv6 Neighbor Discovery send paths (net_ipv6_send_na, net_ipv6_send_ns, net_ipv6_send_rs in subsys/net/ip/ipv6_nbr.c) updated the per-interface ICMP-sent statistics by calling net_pkt_iface(pkt) after net_send_data(pkt) had already returned successfully. On the success path the network stack owns and releases the packet's reference (the L2/driver send unrefs it, e.g. ethernet_send -> net_pkt_unref), so for a freshly allocated packet with refcount 1 the net_pkt slab block can be freed before the statistics line runs (synchronously when no TX queue thread is configured, or via a concurrent TX thread otherwise).
The subsequent net_pkt_iface(pkt) reads pkt->iface from the freed slab block, and with CONFIG_NET_STATISTICS_PER_INTERFACE enabled that loaded pointer is dereferenced to increment iface->stats.icmp.sent, a use-after-free (CWE-416). If the slab block was reallocated in the meantime the read/increment targets unrelated or attacker-influenced memory, yielding corrupted statistics, a fault/crash (denial of service), or potential limited memory corruption.
The vulnerable Neighbor Advertisement path is reachable by any unauthenticated on-link node simply by sending ICMPv6 Neighbor Solicitations to a Zephyr node with native IPv6 enabled (handle_ns_input -> net_ipv6_send_na).
Affected from v3.3.0 through v4.4.0; the fix uses the already-available iface argument instead of touching the sent packet. Configurations without per-interface statistics dereference only a global counter and are not affected by the memory-safety aspect.
📍 영향받는 시스템
Zephyr OS v3.3.0 ~ v4.4.0 (CONFIG_NET_STATISTICS_PER_INTERFACE 활성화 시)
⚔️ 공격 벡터
인증되지 않은 로컬 네트워크 노드가 대상 시스템에 ICMPv6 Neighbor Solicitation 패킷을 전송
🛡️ 대응 방법
Zephyr OS를 최신 패치 버전으로 업데이트하거나, 인터페이스별 통계 기능(CONFIG_NET_STATISTICS_PER_INTERFACE)을 비활성화합니다.
🔧 검증 코드
명령어 결과에 해당 설정이 'y'로 나타나고 버전이 취약 범위 내에 있다면 해당 취약점에 노출된 상태입니다.
grep -r "CONFIG_NET_STATISTICS_PER_INTERFACE=y" .
📊 CVSS Vector String
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L
💻 영향받는 소프트웨어
Windows iSCSI Target Service