🇰🇷 한글 설명
Linux 커널의 virtio-fs 구성 중 큐 설정 실패 시 발생하는 이중 해제(double-free) 취약점입니다. virtio_find_vqs() 실패 시 메모리를 해제한 후 포인터를 NULL로 초기화하지 않아, 이후 kobject 해제 과정에서 동일한 메모리를 다시 해제하려고 시도하여 시스템 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 연결하는 과정에서 오류가 났을 때, 이미 치운 물건을 또 치우려고 시도하면서 시스템이 혼란에 빠지는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
virtio-fs: avoid double-free on failed queue setup
virtio_fs_setup_vqs() allocates fs->vqs and fs->mq_map before calling
virtio_find_vqs(). If virtio_find_vqs() fails, the error path frees both
pointers and returns an error to virtio_fs_probe().
virtio_fs_probe() then drops the last kobject reference, and
virtio_fs_ktype_release() frees fs->vqs and fs->mq_map again. This leaves
dangling pointers in struct virtio_fs and can trigger a double-free during
probe failure cleanup.
Set fs->vqs and fs->mq_map to NULL immediately after kfree() in the
virtio_fs_setup_vqs() error path so that the later kobject release sees an
uninitialized state and kfree(NULL) becomes harmless.
This can be reproduced when a broken virtio-fs device advertises more
request queues than the transport actually provides. In that case
virtio_find_vqs() fails while setting up the extra queue, and the probe
path reaches the double-free cleanup sequence.
📍 영향받는 시스템
Linux kernel (virtio-fs 구성 요소가 포함된 버전)
⚔️ 공격 벡터
비정상적인 요청 큐 개수를 광고하는 손상된 virtio-fs 장치를 통해 프로브(probe) 과정 유도
🛡️ 대응 방법
커널 패치를 적용하여 메모리 해제 후 포인터를 NULL로 초기화하도록 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인