CVE-2025-38508
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-08-16

Last updated on: 2025-11-19

Assigner: kernel.org

Description
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 ]
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-08-16
Last Modified
2025-11-19
Generated
2026-05-07
AI Q&A
2025-08-16
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
linux linux_kernel 6.16
linux linux_kernel 6.16
linux linux_kernel 6.16
linux linux_kernel 6.16
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-NVD-CWE-noinfo
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability involves a timing discrepancy in Linux kernel's handling of Secure TSC frequency for SEV-SNP virtual machines. The GUEST_TSC_FREQ MSR reports a nominal CPU frequency that slightly deviates from the actual mean TSC frequency. Over time, this causes clock skew between the hypervisor and the VM, leading to early timer interrupts perceived by the guest. The guest kernel relies on the nominal frequency for timekeeping, but the actual frequency differs, causing inaccurate time calculations and premature firing of high-resolution timers. The fix uses the TSC_FACTOR from the SEV firmware's secrets page to calculate the mean TSC frequency accurately, mitigating clock skew.


How can this vulnerability impact me? :

This vulnerability can cause inaccurate timekeeping within SEV-SNP virtual machines, leading to clock skew and early timer interrupts. This may affect time-sensitive applications running inside the VM, potentially causing unexpected behavior, performance issues, or errors related to timing.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, ensure that the Linux kernel uses the TSC_FACTOR from the SEV firmware's secrets page to calculate the mean TSC frequency for accurate timekeeping in SEV-SNP VMs. Additionally, use early_ioremap_encrypted() to map the secrets page during early TSC initialization instead of ioremap_encrypted(), which can cause a panic due to kmalloc() unavailability.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart