🇰🇷 한글 설명
Linux 커널의 KVM arm64 구현에서 pKVM hyp vCPU를 플러시할 때 used_lrs 경계 검사가 누락된 취약점입니다. 호스트가 제공한 vGIC 값이 구현된 리스트 레지스터 수를 초과할 경우, EL2 단계에서 vgic_lr[] 배열 및 ICH_LR<n>_EL2에 잘못된 인덱스로 접근할 수 있습니다.
💡 쉬운 설명
가상화 기술을 사용하는 시스템에서 호스트가 조작된 값을 보내면, 시스템의 가장 높은 권한 영역인 EL2 메모리에 잘못 접근할 수 있는 보안 결함입니다. 이를 통해 시스템 권한을 탈취하거나 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: Bound used_lrs when flushing the pKVM hyp vCPU
flush_hyp_vcpu() copies the host vGIC state into the hyp's private vCPU
on every run. The vGIC list register save and restore use used_lrs as
their loop bound and expect it to stay within the number of implemented
list registers. While this is generally the case, flush_hyp_vcpu()
copies vgic_v3 verbatim and does not enforce this, so a value provided
by the host is used at EL2 to index vgic_lr[] and access ICH_LR<n>_EL2
(host -> EL2).
Fix by clamping used_lrs to the number of implemented list registers
after the copy, as the trusted path already does in
vgic_flush_lr_state(). The number of implemented list registers is
constant after init, so it is replicated once from
kvm_vgic_global_state.nr_lr into hyp_gicv3_nr_lr rather than read on
every entry.
📍 영향받는 시스템
Linux kernel (arm64 architecture using KVM/pKVM)
⚔️ 공격 벡터
호스트가 조작된 vGIC 상태 값을 제공하여 EL2 단계의 메모리 인덱스 범위를 초과하도록 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 used_lrs 값이 구현된 레지스터 수를 초과하지 않도록 제한(clamping) 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인