🇰🇷 한글 설명
Linux 커널의 SCSI 에러 핸들러에서 태그 할당 시 블로킹이 발생하여 데드락(Deadlock)이 유발되는 취약점입니다. 에러 처리 과정에서 사용 가능한 태그가 없을 때 대기 상태에 빠지며, 이는 재시작 프로세스를 방해하여 I/O가 영구적으로 중단되는 결과를 초래합니다.
💡 쉬운 설명
컴퓨터의 저장 장치가 오류를 복구하려고 할 때, 복구 작업 자체가 필요한 자원을 기다리느라 멈춰버리는 현상입니다. 이로 인해 USB 저장 장치 같은 기기에서 데이터 읽기/쓰기가 완전히 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: core: Do not block on tag allocation in scsi_eh_lock_door()
scsi_eh_lock_door() is called from scsi_restart_operations() while the
host is still in the SHOST_RECOVERY state, i.e. before the host is
switched back to SHOST_RUNNING and scsi_run_host_queues() restarts the
queues. It allocates a request via scsi_alloc_request() with no flags,
so blk_mq_get_tag() may block waiting for a free sched tag when all tags
are already in use.
Those tags can be held by commands that were just requeued by
scsi_eh_flush_done_q() during error handling. Such commands cannot be
dispatched until the host leaves SHOST_RECOVERY and
scsi_run_host_queues() is called - which only happens *after*
scsi_eh_lock_door() returns.
This forms a circular dependency:
- scsi_eh_lock_door(), running in the SCSI error handler thread, waits
for a sched tag held by a requeued command;
- the requeued command cannot complete and release its sched tag until
the error handler thread leaves scsi_restart_operations() and restart
the queues.
For devices with a single driver tag (e.g. USB storage) it is a
guaranteed deadlock and I/O that can never be submitted. This problem
has also been reproduced in our environment.
Locking the door is a best-effort operation, and scsi_eh_lock_door()
already returns silently when the request allocation fails. Pass
BLK_MQ_REQ_NOWAIT to scsi_alloc_request() so the allocation fails
instead of blocking when no tag is available. This breaks the circular
dependency and allows the error handler to finish restarting the queues,
after which the pending commands are dispatched normally.
📍 영향받는 시스템
Linux Kernel (SCSI core 관련 버전)
⚔️ 공격 벡터
로컬 시스템에서 특정 I/O 오류를 유도하여 커널 데드락 발생 가능
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 scsi_alloc_request()에 BLK_MQ_REQ_NOWAIT 플래그를 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux