🇰🇷 한글 설명
Linux 커널의 net/bpf 서브시스템에서 xdp_master_redirect() 함수가 NULL 포인터를 적절히 검사하지 않아 발생하는 취약점입니다. 본딩 슬레이브 장치가 해제되는 과정에서 마스터 장치와의 연결이 끊겼음에도 불구하고 NULL 체크 없이 마스터의 플래그에 접근하여 커널 패닉(Kernel Panic)을 유발할 수 있습니다.
💡 쉬운 설명
네트워크 장치들이 서로 연결되어 작동하는 과정에서, 연결이 끊긴 상태를 확인하지 못하고 잘못된 메모리 주소에 접근하여 컴퓨터 시스템이 갑자기 멈추거나 꺼지는 문제입니다. 이는 시스템의 안정성을 해칠 수 있는 심각한 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net, bpf: check master for NULL in xdp_master_redirect()
xdp_master_redirect() dereferences the result of
netdev_master_upper_dev_get_rcu() without a NULL check, but that helper
returns NULL when the receiving device has no upper-master adjacency.
The reach guard only checks netif_is_bond_slave(). On bond slave release
bond_upper_dev_unlink() drops the upper-master adjacency before clearing
IFF_SLAVE, so an XDP_TX reaching xdp_master_redirect() in that window
still passes netif_is_bond_slave() while master is already NULL, and
faults on master->flags at offset 0xb0:
BUG: kernel NULL pointer dereference, address: 00000000000000b0
RIP: 0010:xdp_master_redirect (net/core/filter.c:4432)
Call Trace:
xdp_master_redirect (net/core/filter.c:4432)
bpf_prog_run_generic_xdp (include/net/xdp.h:700)
do_xdp_generic (net/core/dev.c:5608)
__netif_receive_skb_one_core (net/core/dev.c:6204)
process_backlog (net/core/dev.c:6319)
__napi_poll (net/core/dev.c:7729)
net_rx_action (net/core/dev.c:7792)
handle_softirqs (kernel/softirq.c:622)
__dev_queue_xmit (include/linux/bottom_half.h:33)
packet_sendmsg (net/packet/af_packet.c:3082)
__sys_sendto (net/socket.c:2252)
Kernel panic - not syncing: Fatal exception in interrupt
The missing check dates back to the original code; commit 1921f91298d1
("net, bpf: fix null-ptr-deref in xdp_master_redirect() for down master")
later added the master->flags read where the fault now lands but kept the
unconditional deref. Check master for NULL before use; a NULL master is
treated the same as one that is not up.
📍 영향받는 시스템
Linux Kernel (xdp_master_redirect 관련 모듈 사용 시스템)
⚔️ 공격 벡터
네트워크 본딩(Bonding) 구성 중 슬레이브 장치를 해제하는 과정에서 특정 타이밍에 XDP_TX 패킷을 전송하여 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 xdp_master_redirect() 내의 NULL 체크 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.