🇰🇷 한글 설명
Linux 커널의 KVM SEV 구현에서 호스트 내 마이그레이션 시 캐시 유지보수 순서로 인해 발생하는 취약점입니다. SEV 상태를 해제하기 전에 소스 VM의 캐시를 명시적으로 플러시하지 않으면, 메모리 회수 과정에서 데이터가 올바르게 처리되지 않고 새로운 페이지 소유자의 데이터를 덮어쓸 수 있는 짧은 시간적 틈이 발생합니다.
💡 쉬운 설명
가상 머신을 옮기는 과정에서 데이터를 안전하게 저장하기 전에 '사용 중' 표시를 먼저 꺼버리는 문제가 있었습니다. 이로 인해 이전 데이터가 새로운 데이터 위에 잘못 덮어씌워져 데이터 오염이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: SEV: Do cache maintenance on the source VM *before* clearing SEV state
Explicitly flush caches after intra-host migration before clearing "SEV
active" on the source VM, as doing cache maintenance afterwards creates a
tiny window where memory reclaim could return memory to the host without
performing a cache flush, e.g. as pointed out by Sashiko:
CPU1 in sev_migrate_from():
src->active = false;
CPU2 running concurrent unmap:
Since active is false, the automatic cache flush in
sev_guest_memory_reclaimed is skipped.
The host frees and reallocates the page.
CPU1 in sev_migrate_from():
sev_writeback_caches(src_kvm);
Executes a hardware cache flush (wbnoinvd), which writes the guest's old
dirty ciphertext over the new page owner's data.
📍 영향받는 시스템
Linux Kernel (KVM/SEV 관련 모듈 사용 환경)
⚔️ 공격 벡터
호스트 내 VM 마이그레이션 및 메모리 회수 과정에서의 레이스 컨디션(Race Condition)
🛡️ 대응 방법
KVM SEV 캐시 유지보수 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인