🇰🇷 한글 설명
Linux 커널의 vfio 모듈에서 vfio_mig_get_next_state() 함수가 지원되지 않는 상태를 건너뛰는 과정에서 무한 루프에 빠지는 취약점이 발견되었습니다. 특정 상태 전이가 차단될 경우 ERROR 센티넬을 제대로 처리하지 못해 드라이버 상태 뮤텍스를 점유한 채 무한 루프를 돌게 되며, 이는 시스템 소프트 락업(soft lockup)이나 커널 패닉을 유발할 수 있습니다.
💡 쉬운 설명
리눅스 시스템의 특정 장치 관리 기능에서 오류가 발생했을 때, 시스템이 이를 해결하지 못하고 무한히 반복 계산을 수행하는 문제입니다. 이로 인해 컴퓨터가 멈추거나 시스템 전체가 강제로 재부팅될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
vfio: prevent infinite loop in vfio_mig_get_next_state() on blocked arc
vfio_mig_get_next_state() walks vfio_from_fsm_table[] one step at a time,
looping to skip optional states the device does not support until
*next_fsm is supported. A blocked transition is encoded as
VFIO_DEVICE_STATE_ERROR, which the trailing return reports as -EINVAL.
The skip loop does not account for the ERROR sentinel.
state_flags_table[ERROR] is ~0U and vfio_from_fsm_table[ERROR][*] is
ERROR, so once *next_fsm becomes ERROR the loop condition stays true and
*next_fsm never changes. The blocked arcs STOP_COPY -> PRE_COPY and
STOP_COPY -> PRE_COPY_P2P map to ERROR yet pass the support check on a
precopy-capable device, causing the loop to spin forever while holding
the driver state mutex. This can result in a soft lockup, and a panic
with softlockup_panic set.
Terminate the skip loop on the ERROR sentinel so a blocked transition
falls through to the existing return and reports -EINVAL.
📍 영향받는 시스템
VFIO 기능을 사용하는 Linux Kernel (패치 적용 전 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 VFIO 장치 상태 전이를 유도하여 커널 뮤텍스를 점유하고 시스템을 중단시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 vfio_mig_get_next_state()의 루프 조건에 ERROR 센티넬 처리를 추가해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.