🇰🇷 한글 설명
Linux 커널의 pds_core 모듈에서 장치 제거 시 워크큐(workqueue)가 적절한 시점보다 먼저 파괴되어 발생하는 Use-After-Free 취약점입니다. pdsc_teardown() 호출 전에 워크큐를 파괴함으로써, 오류 경로 또는 인터럽트 서비스 루틴(ISR)을 통해 파괴된 워크큐에 작업이 큐에 추가될 수 있는 문제가 있었습니다.
💡 쉬운 설명
컴퓨터 부품을 제거하는 과정에서 작업 목록을 관리하는 도구가 너무 빨리 사라져서, 사라진 도구를 사용하려다 시스템이 충돌하거나 오류가 발생하는 문제입니다. 이로 인해 시스템이 멈추거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
pds_core: fix use-after-free on workqueue during remove
In pdsc_remove(), the workqueue is destroyed before pdsc_teardown()
is called. This ordering allows two paths to queue work on the
destroyed workqueue:
1. If pdsc_teardown() -> pdsc_devcmd_reset() times out, the error
path in pdsc_devcmd_locked() queues health_work.
2. A NotifyQ event can trigger the ISR and queue work before free_irq()
is called in pdsc_teardown().
Fix by moving destroy_workqueue() after pdsc_teardown() so the
workqueue outlives every queuer; destroy_workqueue() then flushes any
work still pending.
Draining the queued work also requires ordering the teardown so the
resources that work touches are freed last:
- In pdsc_qcq_free(), after freeing the interrupt, cancel_work_sync()
the queue's work and only then clear qcq->intx, so
pdsc_process_adminq()'s read of qcq->intx for interrupt-credit
return cannot race with the clear.
- Free adminqcq before notifyqcq: the shared adminq ISR is released
when adminqcq is freed, and the adminq work accesses notifyqcq, so
both must be stopped before notifyqcq is freed.
📍 영향받는 시스템
Linux kernel (pds_core 모듈을 사용하는 시스템)
⚔️ 공격 벡터
장치 제거 과정 중 특정 타이밍(Timeout 또는 NotifyQ 이벤트)을 이용한 로컬 공격 또는 시스템 불안정 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 워크큐 파괴 순서를 수정해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux