🇰🇷 한글 설명
Linux 커널의 TCP 제로카피 수신 경로에서, 읽을 수 없는(net_iov) 프래그먼트를 페이지 매핑 힌트 검사에 전달하여 NULL 포인터 역참조가 발생하는 문제입니다. 수정은 skb_frag_page() 호출 전에 모든 net_iov 프래그먼트를 거부하도록 가드를 추가하는 것입니다. 실제 하드웨어 환경에서의 도달 가능성은 아직 검증되지 않았습니다.
💡 쉬운 설명
리눅스 커널이 네트워크 데이터를 빠르게 복사하는 특정 기능에서 잘못된 메모리 주소를 참조해 시스템이 멈출 수 있는 결함입니다. 커널 업데이트로 해당 검사 로직을 보완하면 이 문제가 해결됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tcp: reject net_iov in zerocopy receive mapping hints
After copying a readable prefix, receive_fallback_to_copy() asks
tcp_zerocopy_set_hint_for_skb() where page mapping can resume. If the
next skb is unreadable, find_next_mappable_frag() passes its net_iov
fragment to can_map_frag().
skb_frag_page() returns NULL for a net_iov, but can_map_frag()
dereferences it in PageCompound(). A v7.2 KASAN run on a connected TCP
socket with 64 readable bytes followed by a 4096-byte NET_IOV_DMABUF
fragment reported:
BUG: KASAN: null-ptr-deref in can_map_frag
tcp_zerocopy_receive -> can_map_frag
Kernel panic - not syncing: KASAN: panic_on_warn set
The diagnostic inserted the net_iov directly because the test host has
no devmem-capable NIC. Hardware end-to-end reachability remains untested
and requires CONFIG_NET_DEVMEM plus a supported DMA-buf-bound RX queue.
Reject all net_iov fragments before skb_frag_page(). This covers both
DMABUF and IOURING net_iov types while leaving page-backed checks
unchanged. With the guard, the same queue copied the readable prefix,
returned a 4096-byte skip hint, and completed without a fault.
📍 영향받는 시스템
CONFIG_NET_DEVMEM이 활성화된 Linux 커널 (개발 중인 v7.2 기준, 정확한 영향 범위 미확인)
⚔️ 공격 벡터
네트워크로 연결된 TCP 소켓을 통해 특수하게 구성된 데이터 프래그먼트를 전송하여 커널 패닉을 유발할 수 있는 것으로 보이나, 실제 하드웨어에서의 악용 가능성은 검증되지 않았습니다.
🛡️ 대응 방법
Linux 커널 메인라인 또는 배포판의 보안 업데이트에서 해당 커밋(net_iov 프래그먼트 거부 가드)을 포함한 버전으로 업그레이드하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 수정이 포함된 패치 버전 이상인지 배포판 보안 공지나 커널 changelog와 대조하며, CONFIG_NET_DEVMEM이 비활성화되어 있다면 이 문제의 영향을 받지 않습니다.