🇰🇷 한글 설명
Linux 커널의 virtio-net 드라이버에서 XDP(eXpress Data Path) 프레임 길이 검사 오류가 발견되었습니다. 첫 번째 버퍼의 경우 virtio 헤더로 인해 사용 가능한 데이터 공간이 제한됨에도 불구하고, 기존 검사 로직이 이를 충분히 고려하지 않아 발생합니다.
💡 쉬운 설명
네트워크 데이터를 처리할 때 데이터의 크기가 실제 저장 공간보다 큰지 확인하는 과정에서 계산 오류가 있었습니다. 이로 인해 정해진 공간보다 더 큰 데이터가 들어올 경우 시스템에 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
virtio-net: xsk: rx: fix the frame's length check
When calling buf_to_xdp, the len argument is the frame data's length
without virtio header's length (vi->hdr_len). We check that len with
xsk_pool_get_rx_frame_size() + vi->hdr_len
to ensure the provided len does not larger than the allocated chunk
size. The additional vi->hdr_len is because in virtnet_add_recvbuf_xsk,
we use part of XDP_PACKET_HEADROOM for virtio header and ask the vhost
to start placing data from
hard_start + XDP_PACKET_HEADROOM - vi->hdr_len
not
hard_start + XDP_PACKET_HEADROOM
But the first buffer has virtio_header, so the maximum frame's length in
the first buffer can only be
xsk_pool_get_rx_frame_size()
not
xsk_pool_get_rx_frame_size() + vi->hdr_len
like in the current check.
This commit adds an additional argument to buf_to_xdp differentiate
between the first buffer and other ones to correctly calculate the maximum
frame's length.
📍 영향받는 시스템
Linux kernel (virtio-net driver using XSK)
⚔️ 공격 벡터
조작된 크기의 네트워크 패킷을 전송하여 메모리 경계 검사를 우회하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.