🇰🇷 한글 설명
Linux 커널의 KVM arm64 환경에서 VNCR TLB 무효화 과정이 MMU 무효화 재시도 메커니즘에 적절히 참여하지 않아 발생하는 취약점입니다. 특정 상황에서 vcpu A가 잘못된 페이지 정보를 TLB에 삽입함으로써 메모리 일관성이 깨질 수 있습니다.
💡 쉬운 설명
컴퓨터의 가상 머신이 메모리 주소를 관리할 때, 한쪽에서 주소를 바꿨는데 다른 쪽에서 옛날 주소를 그대로 믿고 사용하는 오류입니다. 이로 인해 데이터가 꼬이거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: Make VNCR invalidation participate in MMU invalidation retry
A VNCR TLB invalidation can occur on one vcpu while another vcpu is
faulting in this same page. Without correctly handling this, we can
end up with the following scenario:
- vcpu A walks the PTs to translate VNCR
- before vcpu A is able to grab the MMU lock to insert the TLB,
vcpu B updates the S1 PTs with an invalid entry, and issues
a TLBI S1E2 for this VA
- vcpu A inserts the TLB for something that is now invalid
This isn't a new problem, and we manage S2 by having the MMU notifier
to bump up mmu_invalidate_seq on invalidation so that the fault can be
replayed.
We can perform something similar here, and extend invalidate_vncr_va() to
update the same counter, clearly indicating that the context has
changed under our feet. This is safe as the invalidation always happen
while holding the MMU lock for write, and that we sample the sequence
number before walking S1.
📍 영향받는 시스템
Linux Kernel (KVM arm64 구성 요소 포함)
⚔️ 공격 벡터
멀티코어(vcpu) 환경에서 특정 타이밍에 발생하는 레이스 컨디션(Race Condition)을 이용한 메모리 오염
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 VNCR 무효화 시 MMU 시퀀스 번호를 업데이트하도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.