🔍 CVE-2026-97992

0.0
CVSS Score
UNKNOWN
2026-09-25
2026-10-21 13:21
✅ 완료

🇰🇷 한글 설명

Linux 커널의 vhost-vdpa 구성 요소에서 config_ctx가 콜백 실행 중에 해제될 수 있는 Use-After-Free 취약점이 발견되었습니다. VDUSE를 사용하는 경우 사용자 공간에서 이 취약점을 트리거할 수 있으며, 이는 커널 메모리 손상이나 시스템 충돌을 유발할 수 있습니다.

💡 쉬운 설명

프로그램이 사용 중인 메모리 데이터를 다른 작업이 갑자기 삭제해버려서 발생하는 오류입니다. 해커가 이 허점을 이용하면 컴퓨터의 핵심 시스템(커널)을 망가뜨리거나 제어권을 뺏을 위험이 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: vhost-vdpa: protect config_ctx from being freed under the config callback vhost_vdpa_config_cb() loads v->config_ctx and signals it without taking a reference and without holding any lock: struct eventfd_ctx *config_ctx = v->config_ctx; if (config_ctx) eventfd_signal(config_ctx); VHOST_VDPA_SET_CONFIG_CALL replaces that field and drops what is normally the last reference to the old context: swap(ctx, v->config_ctx); if (ctx) eventfd_ctx_put(ctx); eventfd_ctx_put() drops the last kref and frees the context immediately, with no RCU grace period, so a callback that has already loaded the pointer goes on to dereference freed memory. The two sides share no lock: the ioctl runs under vhost_dev.mutex, while the parent invokes the callback from its own interrupt or workqueue context. This is not the reopen refcount underflow fixed by commit f6bbf0010ba0 ("vhost-vdpa: fix use-after-free of v->config_ctx"), which was about vhost_vdpa_config_put() leaving a stale pointer behind. Here the pointer is maintained correctly and it is the read side that is unprotected. With VDUSE as the parent this is reachable from userspace with access to /dev/vduse (root by default). VDUSE_DEV_INJECT_CONFIG_IRQ queues dev->inject, and vduse_dev_irq_inject() runs the callback under VDUSE's own dev->irq_lock, which vhost does not hold. vduse_dev_reset() does flush_work(&dev->inject), but VHOST_VDPA_SET_CONFIG_CALL never goes through reset, so an inject already in flight is not waited for. A process that injects config interrupts on the VDUSE fd while another thread swaps the call fd on the vhost-vdpa fd hits it in seconds: BUG: KASAN: slab-use-after-free in native_queued_spin_lock_slowpath Read of size 4 at addr ffff888107d21808 by task kworker/u17:1/2993 Workqueue: vduse-irq vduse_dev_irq_inject Call Trace: native_queued_spin_lock_slowpath+0x97/0x5b0 _raw_spin_lock_irqsave+0xd4/0xe0 eventfd_signal_mask+0x69/0x120 vhost_vdpa_config_cb+0x34/0x50 vduse_dev_irq_inject+0x46/0x60 process_one_work+0x468/0x950 Allocated by task 2992: do_eventfd+0x50/0x200 __x64_sys_eventfd2+0x2e/0x40 Freed by task 2992: eventfd_ctx_put+0xb9/0xc0 vhost_vdpa_unlocked_ioctl+0x116c/0x2190 Add a spinlock covering every access to config_ctx, so the callback either signals a context that is still alive or observes NULL, and the put happens only once no callback can reach the old value. Clearing the parent's callback before the put would not be enough: of the in-tree set_config_cb() implementations only VDUSE takes a lock, the rest store the pointer unlocked, so that would not order against an in-flight invocation.

📍 영향받는 시스템

Linux Kernel (vhost-vdpa 및 VDUSE 사용 환경)

⚔️ 공격 벡터

사용자 공간에서 /dev/vduse 장치에 접근하여 설정 인터럽트를 주입하는 동시에 vhost-vdpa의 설정 파일 디스크립터를 교체하는 방식

🛡️ 대응 방법

config_ctx에 대한 모든 접근을 보호하는 스핀락(spinlock)을 추가하여 메모리 해제와 콜백 실행 간의 경쟁 상태를 방지하는 커널 패치 적용

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 보안 패치 버전인지 확인합니다.

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel