🇰🇷 한글 설명
리눅스 커널의 KVM arm64 아키텍처에서 vCPU 초기화 경로 중 메모리 핀 리크 및 순서 오류가 발견되었습니다. 오류 발생 시 정리 루틴 누락으로 인해 호스트 vCPU 및 SVE 상태 페이지의 핀 참조가 영구적으로 누출되며, 동시 접근 시 부분적으로 초기화된 vCPU 객체가 관찰될 수 있는 순서 문제가 존재합니다.
💡 쉬운 설명
가상 머신(vCPU)을 생성하는 과정에서 오류가 발생하면 시스템 자원이 제대로 해제되지 않아 메모리가 누출되는 결함이 있습니다. 또한 초기화 중에도 다른 프로세스가 접근할 수 있어 시스템 불안정이나 예기치 않은 동작을 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: Fix pin leak and publication ordering in __pkvm_init_vcpu()
Two bugs exist in the vCPU initialisation path:
1. If a check fails after hyp_pin_shared_mem() succeeds, the cleanup
path jumps to 'unlock' without calling unpin_host_vcpu() or
unpin_host_sve_state(), permanently leaking pin references on the
host vCPU and SVE state pages.
Extract a register_hyp_vcpu() helper that performs the checks and
the store. When register_hyp_vcpu() returns an error, call
unpin_host_vcpu() and unpin_host_sve_state() inline before falling
through to the existing 'unlock' label.
2. register_hyp_vcpu() publishes the new vCPU pointer into
'hyp_vm->vcpus[]' with a bare store, allowing a concurrent caller
of pkvm_load_hyp_vcpu() to observe a partially initialised vCPU
object.
Ensure the store uses smp_store_release() and the load uses
smp_load_acquire(). While 'vm_table_lock' currently serialises the
store and the load, these barriers ensure the reader sees the fully
initialised 'hyp_vcpu' object even if there were a lockless path or
if the lock's own ordering guarantees were insufficient for nested
object initialization.
📍 영향받는 시스템
Linux kernel (KVM arm64 아키텍처 적용 버전)
⚔️ 공격 벡터
로컬에서 반복적인 vCPU 생성 및 초기화 오류를 유발하여 자원 고갈을 유도하거나, 동시성 조건을 악용하여 불안정한 메모리 상태에 접근
🛡️ 대응 방법
벤더가 제공한 최신 커널 패치 또는 업데이트를 적용하여 register_hyp_vcpu()의 오류 처리 및 메모리 순서 보장 메커니즘을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 안정 버전인지 벤더의 보안 공지 또는 업데이트 로그를 통해 확인해야 합니다.