{"id":"CVE-2025-38508","published":"2025-08-16T10:54:45Z","modified":"2026-08-05T12:02:31Z","title":"x86/sev: Use TSC_FACTOR for Secure TSC frequency calculation","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/sev: Use TSC_FACTOR for Secure TSC frequency calculation\n\nWhen using Secure TSC, the GUEST_TSC_FREQ MSR reports a frequency based on\nthe nominal P0 frequency, which deviates slightly (typically ~0.2%) from\nthe actual mean TSC frequency due to clocking parameters.\n\nOver extended VM uptime, this discrepancy accumulates, causing clock skew\nbetween the hypervisor and a SEV-SNP VM, leading to early timer interrupts as\nperceived by the guest.\n\nThe guest kernel relies on the reported nominal frequency for TSC-based\ntimekeeping, while the actual frequency set during SNP_LAUNCH_START may\ndiffer. This mismatch results in inaccurate time calculations, causing the\nguest to perceive hrtimers as firing earlier than expected.\n\nUtilize the TSC_FACTOR from the SEV firmware's secrets page (see \"Secrets\nPage Format\" in the SNP Firmware ABI Specification) to calculate the mean\nTSC frequency, ensuring accurate timekeeping and mitigating clock skew in\nSEV-SNP VMs.\n\nUse early_ioremap_encrypted() to map the secrets page as\nioremap_encrypted() uses kmalloc() which is not available during early TSC\ninitialization and causes a panic.\n\n  [ bp: Drop the silly dummy var:\n    https://lore.kernel.org/r/20250630192726.GBaGLlHl84xIopx4Pt@fat_crate.local ]","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00149,"percentile":0.04136,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/d0195c42e65805938c9eb507657e7cdf8e1e9522","tags":[]},{"url":"https://git.kernel.org/stable/c/52e1a03e6cf61ae165f59f41c44394a653a0a788","tags":[]}],"priority":{"score":5.9,"factors":[{"name":"EPSS percentile","points":0.83},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 73bbf3b0fbba9aa27fef07a1fbd837661a863f03, < d0195c42e65805938c9eb507657e7cdf8e1e9522",">= 73bbf3b0fbba9aa27fef07a1fbd837661a863f03, < 52e1a03e6cf61ae165f59f41c44394a653a0a788"]},{"vendor":"Linux","product":"Linux","versions":["6.14"]}],"euvd":{"id":"EUVD-2025-25090","exploited":false,"provenance":"source"}}