🇰🇷 한글 설명
Linux 커널의 virtio_console 구성 요소에서 장치 제거 시 제어 메시지 버퍼를 잘못 해제하여 발생하는 취약점입니다. 장치가 언바인드될 때 남아있는 쿠키를 처리하는 과정에서 메모리 경계를 벗어나 읽는 slab-out-of-bounds 오류가 발생할 수 있습니다.
💡 쉬운 설명
가상 장치를 제거할 때 컴퓨터 메모리를 정리하는 과정에서 실수로 허용되지 않은 영역까지 읽으려고 시도하는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
virtio_console: do not free control-out buffers on remove
__send_control_msg() publishes &portdev->cpkt as the control-out
virtqueue cookie. remove_vqs() walks every virtqueue and passes leftover
cookies to free_buf(), which treats them as struct port_buffer and
reads sgpages.
If a control message is still on c_ovq when the device is unbound,
free_buf() reads past the ports_device object.
KASAN reported slab-out-of-bounds in free_buf():
free_buf
remove_vqs
virtcons_remove
unbind_store
The object was the ports_device allocated in virtcons_probe().
Drain c_ovq without freeing. The packet lives in portdev and is released
with it.
📍 영향받는 시스템
virtio_console를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
장치 언바인드(Unbind) 시 발생하는 메모리 손상 유도
🛡️ 대응 방법
virtio_console의 버퍼 해제 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인