🇰🇷 한글 설명
Linux 커널의 bonding 모듈에서 IPv6 비활성화 상태일 때 nd_tbl 구조체가 초기화되지 않아 NULL 포인터 역참조가 발생하는 취약점입니다. bonding ARP/NS 검증 활성화 상태에서 IPv6 NS/NA 패킷 수신 시 ipv6_chk_addr() 함수가 초기화되지 않은 메모리에 접근하여 커널 패닉을 야기합니다.
💡 쉬운 설명
IPv6를 비활성화한 상태에서 특정 네트워크 패킷이 들어오면 시스템이 초기화되지 않은 메모리에 접근하여 충돌합니다. 로드밸런싱을 사용하는 서버가 주로 영향을 받습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: bonding: Fix nd_tbl NULL dereference when IPv6 is disabled
When booting with the 'ipv6.disable=1' parameter, the nd_tbl is never
initialized because inet6_init() exits before ndisc_init() is called
which initializes it. If bonding ARP/NS validation is enabled, an IPv6
NS/NA packet received on a slave can reach bond_validate_na(), which
calls bond_has_this_ip6(). That path calls ipv6_chk_addr() and can
crash in __ipv6_chk_addr_and_flags().
BUG: kernel NULL pointer dereference, address: 00000000000005d8
Oops: Oops: 0000 [#1] SMP NOPTI
RIP: 0010:__ipv6_chk_addr_and_flags+0x69/0x170
Call Trace:
<IRQ>
ipv6_chk_addr+0x1f/0x30
bond_validate_na+0x12e/0x1d0 [bonding]
? __pfx_bond_handle_frame+0x10/0x10 [bonding]
bond_rcv_validate+0x1a0/0x450 [bonding]
bond_handle_frame+0x5e/0x290 [bonding]
? srso_alias_return_thunk+0x5/0xfbef5
__netif_receive_skb_core.constprop.0+0x3e8/0xe50
? srso_alias_return_thunk+0x5/0xfbef5
? update_cfs_rq_load_avg+0x1a/0x240
? srso_alias_return_thunk+0x5/0xfbef5
? __enqueue_entity+0x5e/0x240
__netif_receive_skb_one_core+0x39/0xa0
process_backlog+0x9c/0x150
__napi_poll+0x30/0x200
? srso_alias_return_thunk+0x5/0xfbef5
net_rx_action+0x338/0x3b0
handle_softirqs+0xc9/0x2a0
do_softirq+0x42/0x60
</IRQ>
<TASK>
__local_bh_enable_ip+0x62/0x70
__dev_queue_xmit+0x2d3/0x1000
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
? packet_parse_headers+0x10a/0x1a0
packet_sendmsg+0x10da/0x1700
? kick_pool+0x5f/0x140
? srso_alias_return_thunk+0x5/0xfbef5
? __queue_work+0x12d/0x4f0
__sys_sendto+0x1f3/0x220
__x64_sys_sendto+0x24/0x30
do_syscall_64+0x101/0xf80
? exc_page_fault+0x6e/0x170
? srso_alias_return_thunk+0x5/0xfbef5
entry_SYSCALL_64_after_hwframe+0x77/0x7f
</TASK>
Fix this by checking ipv6_mod_enabled() before dispatching IPv6 packets to
bond_na_rcv(). If IPv6 is disabled, return early from bond_rcv_validate()
and avoid the path to ipv6_chk_addr().
📍 영향받는 시스템
Linux 커널 전체, bonding 기능 활성화 + IPv6 비활성화(ipv6.disable=1) 상태의 시스템
⚔️ 공격 벡터
IPv6 NS/NA 패킷을 bonding 인터페이스로 전송하여 커널 NULL 포인터 역참조 트리거 (로컬/원격 가능)
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하거나 ipv6_mod_enabled() 체크 패치 적용
🔧 검증 코드
ipv6.disable=1이 출력되면 취약점 영향 가능성 있음, 기본값이면 IPv6 활성화 상태로 영향 없음
cat /proc/cmdline | grep -o 'ipv6.disable=[01]' || echo 'ipv6 enabled by default'