HIGH Introduced in 7.2
kvm SevGmem UAF
CVE-2026-99177
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: KVM: SEV: Fix page dirtying in sev_gmem_post_populate() set_page_dirty() requires that the caller holds some kind of lock to ensure that the page's mapping does not concurrently go away. That is not the case for a random page we got from get_user_pages_fast(), so use set_page_dirty_lock(). [sean: tag for stable]
02KernelScan AI Analysis
Risk summary
A local attacker with access to /dev/kvm and /dev/sev can trigger a use-after-free in the host kernel by racing a failing SEV-SNP launch update against teardown of the source page's file mapping. This allows arbitrary kernel memory read/write and kernel code execution, leading to full host compromise.
Vulnerability analysis
When an SEV-SNP launch update fails, the kernel writes CPUID data back to the source page provided by userspace and marks that page dirty. The original code called set_page_dirty() without holding the lock that protects the page's address_space mapping. An attacker who controls the source page can cause the launch update to fail (e.g., by supplying invalid CPUID data) and concurrently tear down the page's mapping (e.g., by truncating or unmapping the backing file). This races with set_page_dirty() dereferencing the now-freed address_space, creating a use-after-free on a kernel object containing function pointers and locks. The fix replaces set_page_dirty() with set_page_dirty_lock(), which acquires the mapping's private lock before marking the page dirty, preventing the mapping from disappearing during the operation. The vulnerability is reachable by any local user granted access to /dev/kvm and /dev/sev (typically via the kvm group), including processes inside containers that have those devices passed through.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.2 | 7.2 | 7.2.13 | 184382f9852d |
| mainline | 7.2 | 7.3 | 97818b2fa708 |