🇰🇷 한글 설명
Linux 커널의 vdpa_sim_blk 모듈에서 잘못된 섹터 시작 범위를 검증하지 못해 발생하는 취약점입니다. 잘못된 오프셋이 데이터 경로에 도달하면 정수 언더플로우가 발생하여 버퍼 범위를 벗어난 읽기 또는 쓰기가 가능해집니다.
💡 쉬운 설명
컴퓨터의 저장 장치를 흉내 내는 프로그램에서 범위를 벗어난 명령을 제대로 막지 못하는 문제입니다. 이를 통해 해커가 허용되지 않은 메모리 영역의 데이터를 읽거나 임의로 수정할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
vdpa_sim_blk: reject out-of-range sector starts
vdpasim_blk_check_range() logs an invalid start sector but continues
validating the request. The subsequent unsigned capacity subtraction can
underflow and let an out-of-range buffer offset reach the data path.
The invalid offset is used by three request paths. VIRTIO_BLK_T_OUT
copies guest data to blk->buffer + offset through
vringh_iov_pull_iotlb(), causing an out-of-bounds write in
_copy_from_iter() or memcpy(). VIRTIO_BLK_T_IN copies from
blk->buffer + offset to the guest through vringh_iov_push_iotlb(),
causing an out-of-bounds read in _copy_to_iter().
VIRTIO_BLK_T_WRITE_ZEROES passes blk->buffer + offset to memset(),
causing an out-of-bounds write.
Reject starts at or beyond the capacity before the subtraction. Treat the
capacity boundary as invalid because the IN and OUT paths round byte counts
down to sectors for validation but later copy the original byte counts. A
sub-sector request at the capacity boundary would otherwise still access
past the end of the buffer.
I found this bug myself, though the patch was written with AI assistance.
📍 영향받는 시스템
Linux kernel (vdpa_sim_blk 모듈을 사용하는 환경)
⚔️ 공격 벡터
가상화 환경에서 게스트 OS가 조작된 섹터 시작 주소를 포함한 VIRTIO 요청을 전송하여 공격
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 패치된 최신 릴리스 버전인지 확인