🇰🇷 한글 설명
Linux 커널의 KVM arm64 구현에서 SError가 발생했을 때 오래된 ESR 값을 사용하여 ELR_EL2 레지스터를 잘못 수정하는 취약점입니다. IRQ가 SError를 동기화할 경우 이전 예외의 ESR 값이 남아있어, HVC 호출 시 ELR_EL2가 손상되어 게스트의 무관한 명령어가 중복 실행될 수 있습니다.
💡 쉬운 설명
컴퓨터의 가상화 기술(KVM)에서 오류 정보를 처리할 때 옛날 정보를 잘못 사용하여 프로그램 실행 순서가 꼬이는 문제입니다. 이로 인해 특정 명령어가 의도치 않게 두 번 실행되는 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: Avoid consuming a stale esr value when SError occur
When any exception other than an IRQ occurs, the CPU updates the ESR_EL2
register with the exception syndrome. An SError may also become pending,
and will be synchronised by KVM. KVM notes the exception type, and whether
an SError was synchronised in exit_code.
When an exception other than an IRQ occurs, fixup_guest_exit() updates
vcpu->arch.fault.esr_el2 from the hardware register. When an SError was
synchronised, the vcpu esr value is used to determine if the exception
was due to an HVC. If so, ELR_EL2 is moved back one instruction. This
is so that KVM can process the SError first, and re-execute the HVC if
the guest survives the SError.
But if an IRQ synchronises an SError, the vcpu's esr value is stale.
If the previous non-IRQ exception was an HVC, KVM will corrupt ELR_EL2,
causing an unrelated guest instruction to be executed twice.
Check ARM_EXCEPTION_CODE() before messing with ELR_EL2, IRQs don't
update this register so don't need to check.
📍 영향받는 시스템
Linux Kernel (arm64 architecture using KVM)
⚔️ 공격 벡터
게스트 OS 내에서 특정 예외 상황(HVC 호출 및 SError 동기화)을 유도하여 실행 흐름을 조작
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인