🇰🇷 한글 설명
Linux 커널의 vsock/virtio 구성 요소에서 발생하는 취약점으로, virtio 버퍼 큐가 삭제된 후에도 RX 워커가 버퍼를 다시 채우려 시도하여 slab-use-after-free 오류를 유발합니다. 이로 인해 커널 패닉이 발생하거나 시스템 안정성이 저해될 수 있습니다.
💡 쉬운 설명
통신 통로가 폐쇄되었음에도 불구하고 시스템이 계속해서 데이터를 받으려고 시도하다가 이미 사라진 메모리 영역을 건드려 시스템이 멈추는 문제입니다. 이로 인해 컴퓨터가 갑자기 꺼지거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
vsock/virtio: avoid refilling the RX queue after teardown
Commit b917507e5ad9 ("vsock/virtio: stop workers during the .remove()")
made the RX worker jump to its common exit when rx_run is clear. That
exit still refills the RX queue when the buffer count is low, so work
queued across virtio_vsock_vqs_del() can add buffers after the virtqueues
have been deleted.
BUG: KASAN: slab-use-after-free in virtqueue_add_sgs
Read of size 4 by task kworker/0:1
Workqueue: virtio_vsock virtio_transport_rx_work
Call Trace:
virtqueue_add_sgs (drivers/virtio/virtio_ring.c:2796)
virtio_vsock_rx_fill (net/vmw_vsock/virtio_transport.c:332)
virtio_transport_rx_work (net/vmw_vsock/virtio_transport.c:701)
process_one_work (kernel/workqueue.c:3314)
worker_thread (kernel/workqueue.c:3478)
kthread (kernel/kthread.c:436)
ret_from_fork (arch/x86/kernel/process.c:158)
ret_from_fork_asm (arch/x86/entry/entry_64.S:245)
...
Freed by task 141:
kfree (mm/slub.c:6566)
vp_del_vq (drivers/virtio/virtio_pci_common.c:259)
vp_del_vqs (drivers/virtio/virtio_pci_common.c:285)
virtio_vsock_freeze (net/vmw_vsock/virtio_transport.c:912)
virtio_device_freeze (drivers/virtio/virtio.c:658)
virtio_pci_freeze (drivers/virtio/virtio_pci_common.c:601)
pci_pm_freeze (drivers/pci/pci-driver.c:1098)
device_suspend (drivers/base/power/main.c:1968)
Kernel panic - not syncing: KASAN: panic_on_warn set ...
Jump to a no-refill exit when rx_run is clear, leaving the normal exit
to replenish a running queue.
📍 영향받는 시스템
Linux kernel (vsock/virtio 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 또는 가상화 환경 내의 악의적인 프로세스가 vsock 통신 종료 및 재시작 과정을 조작하여 발생
🛡️ 대응 방법
커널 패치(Commit b917507e5ad9 포함 버전)를 적용하여 RX 워커가 종료 시 버퍼를 재충전하지 않도록 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인