🇰🇷 한글 설명
리눅스 커널의 KVM SVM 구현체에서 svm_register_enc_region() 함수 호출 시 발생하는 Use-After-Free(UAF) 취약점입니다. kvm->lock을 해제하기 전에 페이지 플러시를 수행하지 않아, 다른 작업에 의해 메모리 영역이나 페이지 배열이 먼저 해제될 수 있는 문제가 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서 이미 사용이 끝난 메모리 공간을 다시 참조하려고 할 때 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안 공격에 노출될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: SVM: Flush pages under kvm->lock to fix UAF in svm_register_enc_region()
Do the cache flush of converted pages in svm_register_enc_region() before
dropping kvm->lock to fix use-after-free issues where region and/or its
array of pages could be freed by a different task, e.g. if userspace has
__unregister_enc_region_locked() already queued up for the region.
Note, the "obvious" alternative of using local variables doesn't fully
resolve the bug, as region->pages is also dynamically allocated. I.e. the
region structure itself would be fine, but region->pages could be freed.
Flushing multiple pages under kvm->lock is unfortunate, but the entire
flow is a rare slow path, and the manual flush is only needed on CPUs that
lack coherency for encrypted memory.
📍 영향받는 시스템
KVM(Kernel-based Virtual Machine) 및 SVM(Secure Virtual Machine) 기능을 사용하는 리눅스 커널
⚔️ 공격 벡터
사용자 공간(Userspace)에서 특정 메모리 등록 해제 작업을 예약하여 커널의 메모리 관리 로직을 교란하는 방식
🛡️ 대응 방법
KVM SVM 관련 보안 패치가 적용된 최신 버전의 리눅스 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인