🇰🇷 한글 설명
Linux 커널의 crypto ccp 모듈에서 SNP_CONFIG ioctl 호출 시 SNP가 이미 초기화되지 않았음에도 재초기화를 시도하는 취약점이 발견되었습니다. 이로 인해 SEV 초기화 실패 시 특정 ioctl을 통해 MSR_VM_HSAVE_PA를 0으로 설정하여 호스트 시스템의 충돌을 유발할 수 있습니다. 패치에서는 SNP가 이미 초기화된 상태가 아니면 재초기화를 거부하도록 수정되었습니다.
💡 쉬운 설명
시스템의 보안 기능을 설정하는 과정에서 오류가 발생했을 때, 특정 명령을 반복하면 시스템 전체가 멈추거나 꺼질 수 있는 결함입니다. 이를 방지하기 위해 이미 실패한 설정은 다시 시도하지 않도록 보안 규칙을 강화했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Do not initialize SNP for ioctl(SNP_CONFIG)
Sashiko notes:
> if SEV initialization fails and KVM is actively running normal VMs, could a
> userspace process trigger this code path via /dev/sev ioctls (e.g.,
> SEV_PDH_GEN) and zero out MSR_VM_HSAVE_PA globally? Would the next VMRUN
> execution for an active VM trigger a general protection fault and crash the
> host?
Refuse to re-try initialization if SNP is not already initialized for
SNP_CONFIG.
This is technically an ABI break: before if SNP initialization failed it
could be transparently retriggered by this ioctl, and if no VMs were
running, everything worked fine. Hopefully this is enough of a corner case
that nobody will notice, but someone does, there are a few options:
* do something like symbol_get() for kvm and refuse to initialize if KVM is
loaded
* check each cpu's HSAVE_PA for non-zero data before re-initializing
* once initialization has failed, continue to refuse to initialize until
the ccp module is unloaded
📍 영향받는 시스템
Linux kernel (ccp module 사용 환경)
⚔️ 공격 벡터
사용자 공간 프로세스가 /dev/sev ioctl을 통해 잘못된 초기화 경로를 트리거하여 호스트 시스템의 충돌 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ccp 모듈의 SNP 재초기화 방지 로직 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인