🇰🇷 한글 설명
Linux 커널의 Hyper-V VMBus 드라이버에서 오류 또는 종료 경로 시 conn_state를 강제로 DISCONNECTED로 설정하여, vmbus_initiate_unload()가 실제 연결 해제를 수행하지 못하는 문제입니다. 이로 인해 VMBus 연결이 유지되어 Hyper-V 호스트가 계속 메시지나 인터럽트를 전송할 수 있습니다. 해당 결함은 commit 74347a99e73ae 도입 이후 존재했으며, conn_state를 강제 변경하지 않도록 수정되었습니다.
💡 쉬운 설명
가상 머신과 하이퍼바이저 사이의 연결이 종료되어야 할 상황에서도 연결 상태 표시가 잘못 바뀌어 실제 연결이 끊어지지 않을 수 있습니다. 이 때문에 호스트 쪽 통신이 계속 살아 있게 되어 보안상 위험이 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Drivers: hv: Don't reset VMBus connection state on error/exit paths
In two places, current code forces vmbus_connection.conn_state to
DISCONNECTED prior to calling vmbus_disconnect(). But vmbus_disconnect()
calls vmbus_initiate_unload(), which unloads the VMBus connection
only if the conn_state is CONNECTED. Consequently, the connection
remains and the Hyper-V host might continue to send messages or post
VMBus interrupts.
The problem was introduced in commit 74347a99e73ae ("x86/Hyper-V:
Unload vmbus channel in hv panic callback"), in that
vmbus_initiate_unload() started checking the current connection
state before doing the unload. This commit removed some occurrences
where conn_state was forced to DISCONNECTED, but these two remained,
apparently due to an oversight at the time.
Fix this by not forcing conn_state to DISCONNECTED during VMBus exit,
or if a failure occurs when establishing the connection in the first
place. Whatever value conn_state has at the time is then read by
vmbus_initiate_unload() to determine if there is a connection to
be unloaded.
📍 영향받는 시스템
Hyper-V 환경에서 동작하는 Linux 커널 (VMBus 드라이버를 사용하는 버전, 패치 이전 커널)
⚔️ 공격 벡터
Hyper-V 호스트 측 또는 연결 해제 실패 상황을 유발할 수 있는 로컬/호스트 측 조건에서 잔존 VMBus 연결을 통해 비정상 메시지 또는 인터럽트를 전달하는 방식
🛡️ 대응 방법
배포판 벤더가 제공하는 수정이 포함된 Linux 커널 업데이트를 적용하고 재부팅합니다.
🔧 검증 코드
출력된 커널 버전이 벤더의 패치 배포 버전 이상인지 확인하고, hv 관련 모듈이 로드되어 있다면 해당 커널이 Hyper-V VMBus 드라이버를 사용하는 환경이므로 패치 적용 대상입니다.
uname -r && grep -i hyperv /proc/modules 2>/dev/null | head -5