🇰🇷 한글 설명
Linux 커널의 ublk 구성 요소에서 발생한 취약점으로, ublk 서버가 비정상적인 복구 시퀀스를 보낼 경우 장치가 잘못된 상태로 표시될 수 있습니다. 이로 인해 I/O 요청이 큐에 갇히게 되어 시스템의 fsync 작업이 무한 대기 상태에 빠지거나 시스템 종료가 중단되는 현상이 발생합니다.
💡 쉬운 설명
컴퓨터의 저장 장치를 관리하는 소프트웨어에서 데이터 처리 순서가 꼬이는 오류가 발견되었습니다. 이 오류가 발생하면 데이터를 저장하려는 시도가 멈추거나 컴퓨터를 끌 때 응답이 없을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ublk: wait on ublk_dev_ready() instead of ub->completion
ub->completion is only re-armed by a successful START_USER_RECOVERY. If
the ublk server sends END_USER_RECOVERY without one - e.g. its START
failed with -EBUSY and the error was ignored - the wait is satisfied by
the stale completion of the previous recovery cycle, and the device is
marked LIVE and the requeue list kicked while the FETCH stream is still
running and ubq->canceling is still set. The kick redispatches a
previously requeued request, __ublk_queue_rq_common() sees ->canceling
and parks it again via __ublk_abort_rq(), and after the last FETCH
clears ->canceling nothing ever kicks the requeue list again: the
request is stranded there while holding its tag. If it is the flush
machinery's flush_rq, every subsequent fsync piles up in uninterruptible
sleep and teardown hangs on tag draining. This matches a report of a
lost PREFLUSH with ext4 on top of ublk after daemon crash recovery.
ub->completion is an edge-triggered latch used as a proxy for the level
condition "every queue has fetched all I/O commands", which can regress
(F_BATCH's UNPREP, daemon death) and whose re-arm can be skipped. Drop
it and wait on the real condition instead: the new helper
ublk_wait_dev_ready_and_lock() waits on ublk_dev_ready() via
wait_var_event_interruptible(), woken from ublk_mark_io_ready(), then
re-checks it under ub->mutex, waiting again on regression, and returns
with the mutex held and readiness guaranteed.
Readiness becomes true in the same ub->mutex critical section that
clears the last queue's ->canceling, so END_USER_RECOVERY marks the
device LIVE and kicks the requeue list strictly after ->canceling
clears. The wait stays interruptible, so a server whose daemon died can
still be signalled out. For ublk_ctrl_start_dev() this replaces the
fail-fast -EINVAL on an F_BATCH ready->UNPREP regression with waiting
until the device is ready again.
📍 영향받는 시스템
Linux kernel (ublk 모듈을 사용하는 시스템)
⚔️ 공격 벡터
ublk 서버(데몬)가 의도적으로 잘못된 복구 신호(END_USER_RECOVERY)를 보내 I/O 요청을 고립시킴
🛡️ 대응 방법
ublk의 상태 확인 로직이 개선된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux