🇰🇷 한글 설명
Linux 커널의 net: team 모듈에서 모드 변경 시 발생하는 NULL 포인터 역참조 취약점입니다. 모드 변경 과정에서 ops 구조체가 초기화되는 동안 다른 CPU에서 패킷 전송이 시도되면 NULL 함수 포인터를 호출하여 커널 크래시가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 설정이 바뀌는 아주 짧은 순간에 데이터를 보내려고 하면 컴퓨터의 핵심 시스템(커널)이 길을 잃고 멈춰버리는 문제입니다. 이로 인해 시스템이 갑자기 재부팅되거나 중단될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: team: fix NULL pointer dereference in team_xmit during mode change
__team_change_mode() clears team->ops with memset() before restoring
safe dummy handlers via team_adjust_ops(). A concurrent team_xmit()
running under RCU on another CPU can read team->ops.transmit during
this window and call a NULL function pointer, crashing the kernel.
The race requires a mode change (CAP_NET_ADMIN) concurrent with
transmit on the team device.
BUG: kernel NULL pointer dereference, address: 0000000000000000
Oops: 0010 [#1] SMP KASAN NOPTI
RIP: 0010:0x0
Call Trace:
team_xmit (drivers/net/team/team_core.c:1853)
dev_hard_start_xmit (net/core/dev.c:3904)
__dev_queue_xmit (net/core/dev.c:4871)
packet_sendmsg (net/packet/af_packet.c:3109)
__sys_sendto (net/socket.c:2265)
The original code assumed that no ports means no traffic, so mode
changes could freely memset()/memcpy() the ops. AF_PACKET with
forced carrier breaks that assumption.
Prevent the race instead of making it safe: replace memset()/memcpy()
with per-field updates that never touch transmit or receive. Those
two handlers are managed solely by team_adjust_ops(), which already
installs dummies when tx_en_port_count == 0 (always true during mode
change since no ports are present). WRITE_ONCE/READ_ONCE prevent
store/load tearing on the handler pointers.
synchronize_net() before exit_op() drains in-flight readers that may
still reference old mode state from before port removal switched the
handlers to dummies.
📍 영향받는 시스템
Linux kernel (net: team driver 사용 시스템)
⚔️ 공격 벡터
CAP_NET_ADMIN 권한을 가진 사용자가 네트워크 모드 변경을 수행하는 동시에 패킷 전송을 유도하는 레이스 컨디션 공격
🛡️ 대응 방법
커널 패치를 통해 memset/memcpy 대신 개별 필드 업데이트 방식을 적용하고 synchronize_net()을 사용하여 레이스 컨디션을 방지해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.