🇰🇷 한글 설명
Linux 커널의 x86/SEV 구성에서 Secure TSC의 주파수 계산 방식 오류로 인해 발생하는 취약점입니다. 실제 TSC 주파수와 보고된 명목 주파수 간의 차이가 누적되어 SEV-SNP 가상 머신의 시계 왜곡(clock skew) 및 타이머 인터럽트 오작동을 유발합니다.
💡 쉬운 설명
가상 컴퓨터의 시계가 실제 시간보다 빠르게 흘러가서 타이머 기능이 예상보다 일찍 작동하는 문제입니다. 이로 인해 시스템의 시간 계산이 부정확해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
x86/sev: Use TSC_FACTOR for Secure TSC frequency calculation
When using Secure TSC, the GUEST_TSC_FREQ MSR reports a frequency based on
the nominal P0 frequency, which deviates slightly (typically ~0.2%) from
the actual mean TSC frequency due to clocking parameters.
Over extended VM uptime, this discrepancy accumulates, causing clock skew
between the hypervisor and a SEV-SNP VM, leading to early timer interrupts as
perceived by the guest.
The guest kernel relies on the reported nominal frequency for TSC-based
timekeeping, while the actual frequency set during SNP_LAUNCH_START may
differ. This mismatch results in inaccurate time calculations, causing the
guest to perceive hrtimers as firing earlier than expected.
Utilize the TSC_FACTOR from the SEV firmware's secrets page (see "Secrets
Page Format" in the SNP Firmware ABI Specification) to calculate the mean
TSC frequency, ensuring accurate timekeeping and mitigating clock skew in
SEV-SNP VMs.
Use early_ioremap_encrypted() to map the secrets page as
ioremap_encrypted() uses kmalloc() which is not available during early TSC
initialization and causes a panic.
[ bp: Drop the silly dummy var:
https://lore.kernel.org/r/20250630192726.GBaGLlHl84xIopx4Pt@fat_crate.local ]
📍 영향받는 시스템
AMD SEV-SNP를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
직접적인 공격보다는 시스템 운영 중 발생하는 시간 불일치로 인한 서비스 가용성 저하 및 타이머 오작동 유발
🛡️ 대응 방법
SEV 펌웨어의 TSC_FACTOR를 사용하여 주파수를 계산하도록 업데이트된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인하십시오.