🇰🇷 한글 설명
Linux 커널의 crypto: ccp 구성 요소에서 SEV ioctl 호출 시 SNP를 불필요하게 초기화하던 취약점이 해결되었습니다. 기존에는 특정 SEV 명령 수행 시 SNP가 초기화되어 MSR_VM_HSAVE_PA를 초기화함으로써 호스트 시스템의 충돌을 유발할 가능성이 있었습니다. 이번 패치는 SNP 초기화를 건너뛰어 시스템 안정성을 확보하고 실제 펌웨어 오류를 정확히 반환하도록 수정되었습니다.
💡 쉬운 설명
특정 보안 기능을 사용할 때 시스템의 중요한 설정값이 실수로 지워져 컴퓨터가 갑자기 멈추거나 꺼질 수 있는 문제가 있었습니다. 이제는 필요한 기능만 정확히 작동하도록 수정되어 시스템이 훨씬 안정적입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Do not initialize SNP for SEV ioctls
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?
sev_move_to_init_state() is called for ioctls requiring only SEV firmware:
SEV_PEK_GEN, SEV_PDH_GEN, SEV_PEK_CSR, SEV_PEK_CERT_IMPORT, and
SEV_PDH_CERT_EXPORT. After the firmware command, it does SEV_SHUTDOWN on
the SEV firmware. Since these commands do not require SNP to be
initialized, skip it by calling __sev_platform_init_locked() which only
initializes the SEV firmware. This way SNP is not Initialized at all, and
HSAVE_PA is not cleared.
The previous code saved any SEV initialization firmware error to
init_args.error and then threw it away and hardcoded the return value of
INVALID_PLATFORM_STATE regardless of the real firmware error. This patch
changes it to surface the underlying error, which is hopefully both more
useful and doesn't cause any problems.
Note that it is still safe to call __sev_firmware_shutdown() directly: it
calls __sev_snp_shutdown_locked(), which skips SNP shutdown if SNP was not
initialized.
📍 영향받는 시스템
Linux Kernel (SEV/SNP 지원 환경)
⚔️ 공격 벡터
사용자 공간 프로세스가 /dev/sev ioctls를 통해 특정 SEV 명령을 호출하여 시스템 충돌 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인