🇰🇷 한글 설명
Linux 커널의 virtio-net 드라이버 내 virtnet_rq_alloc 함수에서 발생하는 오버플로 취약점입니다. 특정 설정(net.core.high_order_alloc_disable=1) 환경에서 버퍼 크기가 페이지 크기를 초과할 경우 메모리 오버플로가 발생하여 시스템 충돌이나 데이터 전송 실패를 유발할 수 있습니다.
💡 쉬운 설명
가상 머신에서 네트워크 데이터를 주고받을 때, 데이터를 담는 그릇의 크기를 잘못 계산하여 넘치는 현상이 발생합니다. 이로 인해 컴퓨터가 갑자기 멈추거나 파일 전송이 끊길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
virtio-net: fix overflow inside virtnet_rq_alloc
When the frag just got a page, then may lead to regression on VM.
Specially if the sysctl net.core.high_order_alloc_disable value is 1,
then the frag always get a page when do refill.
Which could see reliable crashes or scp failure (scp a file 100M in size
to VM).
The issue is that the virtnet_rq_dma takes up 16 bytes at the beginning
of a new frag. When the frag size is larger than PAGE_SIZE,
everything is fine. However, if the frag is only one page and the
total size of the buffer and virtnet_rq_dma is larger than one page, an
overflow may occur.
The commit f9dac92ba908 ("virtio_ring: enable premapped mode whatever
use_dma_api") introduced this problem. And we reverted some commits to
fix this in last linux version. Now we try to enable it and fix this
bug directly.
Here, when the frag size is not enough, we reduce the buffer len to fix
this problem.
📍 영향받는 시스템
virtio-net 드라이버를 사용하는 Linux 커널 기반 가상 머신 (특정 커밋 f9dac92ba908 이후 버전)
⚔️ 공격 벡터
네트워크 패킷을 통한 메모리 오버플로 유도 및 시스템 크래시 유발
🛡️ 대응 방법
최신 보안 패치가 적용된 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 패치 버전인지 확인