🇰🇷 한글 설명
리눅스 커널의 KVM arm64 아키텍처에서 중첩된 mmu_lock 관리 중 메모리 할당 및 해제 순서 오류로 인해 Use-After-Free 취약점이 발생합니다. 이는 MMU 노티파이어 경로에서 해제된 배열을 참조할 수 있게 하여 시스템 불안정이나 권한 상승을 유발할 수 있습니다.
💡 쉬운 설명
가상화 시스템의 메모리 관리 과정에서 잘못된 순서로 데이터를 처리하여, 사라진 메모리를 다시 접근하는 오류가 발생합니다. 이 결함을 악용하면 시스템이 충돌하거나 해커가 높은 권한을 획득할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: Reassign nested_mmus array behind mmu_lock
kvm->arch.nested_mmus[] is walked under kvm->mmu_lock, including from the
MMU notifier path (kvm_unmap_gfn_range() -> kvm_nested_s2_unmap()), which
can run at any time. kvm_vcpu_init_nested() reallocates the array and frees
the old buffer while holding only kvm->arch.config_lock, so such a walker
can reference the freed array.
Allocate the new array outside of mmu_lock, as the allocation can sleep.
Under the lock, copy the existing entries, fix up the back pointers and
reassign the array. Free the old buffer after dropping the lock, as
kvfree() can sleep as well.
📍 영향받는 시스템
Linux kernel (KVM arm64 아키텍처 적용 버전)
⚔️ 공격 벡터
로컬 또는 원격에서 KVM 기반 가상머신 환경에서 메모리 할당 타이밍을 이용한 Use-After-Free 공격 수행
🛡️ 대응 방법
벤더가 제공하는 최신 커널 패치 또는 업데이트를 즉시 적용하여 mmu_lock 내 할당 및 해제 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 패치가 적용된 최신 안정 버전인지 벤더 문서와 비교하여 확인합니다.