🇰🇷 한글 설명
Linux 커널의 xsk 모듈 내 __xsk_rcv() 함수에서 NULL 포인터 역참조 취약점이 발견되었습니다. 멀티 버퍼 경로에서 xsk_buff_alloc()의 반환 값을 확인하지 않고 루프를 실행하여 발생하며, 이는 시스템 충돌이나 일반 보호 오류를 유발할 수 있습니다.
💡 쉬운 설명
데이터를 처리하기 위한 메모리 공간을 빌려올 때, 공간이 부족한지 확인하지 않고 바로 사용하려다 발생하는 오류입니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xsk: fix NULL pointer dereference in __xsk_rcv()
In the __xsk_rcv() multi-buffer path, xsk_buff_alloc() is called in a
loop without checking its return value. xsk_buff_can_alloc() only
counts fill queue entries without validating their addresses, so it
can succeed while xsk_buff_alloc() rejects all remaining entries and
returns NULL.
Oops: general protection fault, probably for non-canonical address
0xdffffc0000000000
KASAN: null-ptr-deref in range
[0x0000000000000000-0x0000000000000007]
RIP: 0010:__xsk_rcv+0x426/0xc20 (net/xdp/xsk.c:350)
Call Trace:
xsk_generic_rcv+0x26d/0x5f0
xdp_do_generic_redirect+0x3c5/0xcf0
do_xdp_generic+0x92f/0xe70
__netif_receive_skb_core.constprop.0+0xf7e/0x2b30
Fix this with a two-stage transaction. First allocate and stage all
buffers required for the packet, recycling all staged buffers with
xsk_buff_free() if any allocation fails. Only after this stage
succeeds, copy the data, reserve the RX descriptors, and release the
buffers in an error-free loop.
📍 영향받는 시스템
Linux kernel (xsk module 사용 환경)
⚔️ 공격 벡터
특수하게 조작된 네트워크 패킷을 전송하여 메모리 할당 실패를 유도함으로써 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 버퍼 할당 로직을 수정해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.