# CVE-2026-90040: KVM: SEV: Forcefully invalidate SNP VMSA if its backing gmem page is zapped

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.21% (percentile 6, 2026-11-26)
- **Published:** 2026-09-16T10:33:38.790Z
- **Modified:** 2026-10-19T09:18:52.240Z

## Who should check

- Anyone running Linux \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< ef4dee4640c6adc3051401399b0788135e77d50b; \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< 2640cc26ed0dd1bf6ec2f6852a60e494093db3e5; \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< d1a3c216233413f57f5341a9b878b7e2dde7e785
- Anyone running Linux 6.11

## Description

In the Linux kernel, the following vulnerability has been resolved:

KVM: SEV: Forcefully invalidate SNP VMSA if its backing gmem page is zapped

Wire up a gmem\_invalidate\_range() call for SNP VMs, and use it to force
vCPUs to reload/recheck their guest-provided VMSA if the backing gmem
page is being invalidated, e.g. is being PUNCH\_HOLE'd.  Use the same core
logic to handle invalidations as VMX does for the APIC-access page, as the
two concepts are nearly identical: shove the physical address of a page
into the vCPU's control structure:

 1. Snapshot the invalidation sequence counter
 2. Grab the pfn (from guest\_memfd in this case)
 3. Acquire mmu\_lock for read
 4. Re-request reload if retry is needed, otherwise commit the change.

Note, the re-request action in \#4 is necessary as KVM's retry logic is
fuzzy, i.e. can get false positives.  If the guest\_memfd page has been
dropped, at some point a subsequent reload will fail to get a PFN from
guest\_memfd, and KVM will fail KVM\_RUN.  If the retry was due to a false
positive, KVM will retry until there are no relevant MMU notifier events
(and will retry in the "outer" loop, i.e. will drop locks and resched as
needed).

Note \#2!  Take care to invalidate the VMSA when a relevant memslot is
DELETED or MOVED, as invalidations in response to PUNCH\_HOLE are predicated
on memslot bindings (KVM doesn't know what GFN range(s) to invalidate
without a binding).  And more importantly, the VMSA mapping requires a
memslot, i.e. must be invalidated if its memslots disappears, regardless of
the state of the underlying guest\_memfd inode.

Failure to invalidate the vCPU's control.vmsa\_pa (which is checked by
pre\_sev\_run()) can prevent KVM from properly freeing the page as firmware
will reject the RMPUPDATE to reclaim the page with FAIL\_INUSE if the vCPU
is actively running, i.e. if VMSA page is in-use.  That in turn leads to an
RMP \#PF on the next use, as the page will still be assigned to the SNP VM.

  SEV-SNP: RMPUPDATE failed for PFN 78d198, pg\_level: 1, ret: 3
  SEV-SNP: PFN 0x78d198, RMP entry: \[0xfff0000000144001 - 0x000000000000000f\]
  CPU: 3 UID: 0 PID: 31345 Comm: sev\_snp\_vmsa\_pu Tainted: G     U     O
  Tainted: \[U\]=USER, \[O\]=OOT\_MODULE
  Hardware name: Google, Inc. Arcadia\_IT\_80/Arcadia\_IT\_80, BIOS 34.86.0-102 01/25/2026
  Call Trace:
   \<TASK\>
   dump\_stack\_lvl+0x54/0x70
   rmpupdate+0x12c/0x140
   rmp\_make\_shared+0x3b/0x60
   sev\_gmem\_invalidate+0xe0/0x170 \[kvm\_amd\]
   delete\_from\_page\_cache\_batch+0x1d8/0x220
   truncate\_inode\_pages\_range+0x120/0x3d0
   kvm\_gmem\_fallocate+0x19a/0x270 \[kvm\]
   vfs\_fallocate+0x1bc/0x1f0
   \_\_x64\_sys\_fallocate+0x48/0x70
   do\_syscall\_64+0x10a/0x480
   entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53
  RIP: 0033:0x496c7e
   \</TASK\>
  ------------\[ cut here \]------------
  SEV: Failed to update RMP entry for PFN 0x78d198 error -14
  WARNING: arch/x86/kvm/svm/sev.c:5160 at sev\_gmem\_invalidate+0x126/0x170 \[kvm\_amd\], CPU\#3: sev\_snp\_vmsa\_pu/31345
  CPU: 3 UID: 0 PID: 31345 Comm: sev\_snp\_vmsa\_pu Tainted: G     U     O
  Tainted: \[U\]=USER, \[O\]=OOT\_MODULE
  Hardware name: Google, Inc. Arcadia\_IT\_80/Arcadia\_IT\_80, BIOS 34.86.0-102 01/25/2026
  RIP: 0010:sev\_gmem\_invalidate+0x12b/0x170 \[kvm\_amd\]
  Call Trace:
   \<TASK\>
   delete\_from\_page\_cache\_batch+0x1d8/0x220
   truncate\_inode\_pages\_range+0x120/0x3d0
   kvm\_gmem\_fallocate+0x19a/0x270 \[kvm\]
   vfs\_fallocate+0x1bc/0x1f0
   \_\_x64\_sys\_fallocate+0x48/0x70
   do\_syscall\_64+0x10a/0x480
   entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53
  RIP: 0033:0x496c7e
   \</TASK\>
  irq event stamp: 20689
  hardirqs last  enabled at (20699): \[\<ffffffff8e76092c\>\] \_\_console\_unlock+0x5c/0x60
  hardirqs last disabled at (20708): \[\<ffffffff8e760911\>\] \_\_console\_unlock+0x41/0x60
  softirqs last  enabled at (20722): \[\<ffffffff8e6cd74e\>\] \_\_irq\_exit\_rcu+0x7e/0x140
  softirqs last disabled at (20717): \[\<ffffffff8e6cd74e\>\] \_\_irq\_exit\_rcu+0x7e/0x140
  ---\[ end trace 0000000000000000 \]---
  BUG: unable to handle page fault for address: ffff99
---truncated---

## Affected and fixed versions

- Linux: \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< ef4dee4640c6adc3051401399b0788135e77d50b; \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< 2640cc26ed0dd1bf6ec2f6852a60e494093db3e5; \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< d1a3c216233413f57f5341a9b878b7e2dde7e785 (cvelist)
- Linux: 6.11 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-90040. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-90040.md
Affected: Linux >= e366f92ea99e1961fbad5e2110900e9f4fcb249b, < ef4dee4640c6adc3051401399b0788135e77d50b; >= e366f92ea99e1961fbad5e2110900e9f4fcb249b, < 2640cc26ed0dd1bf6ec2f6852a60e494093db3e5; >= e366f92ea99e1961fbad5e2110900e9f4fcb249b, < d1a3c216233413f57f5341a9b878b7e2dde7e785; Linux 6.11
Fixed in: Linux 2640cc26ed0dd1bf6ec2f6852a60e494093db3e5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-90040 being exploited?

There is no confirmed exploitation: CVE-2026-90040 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.21% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-90040?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-90040?

Linux \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< ef4dee4640c6adc3051401399b0788135e77d50b; \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< 2640cc26ed0dd1bf6ec2f6852a60e494093db3e5; \>= e366f92ea99e1961fbad5e2110900e9f4fcb249b, \< d1a3c216233413f57f5341a9b878b7e2dde7e785; Linux 6.11.

### Is there a fix for CVE-2026-90040?

Yes. Fixed in Linux 2640cc26ed0dd1bf6ec2f6852a60e494093db3e5. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-90040?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/ef4dee4640c6adc3051401399b0788135e77d50b>
- other: <https://git.kernel.org/stable/c/2640cc26ed0dd1bf6ec2f6852a60e494093db3e5>
- other: <https://git.kernel.org/stable/c/d1a3c216233413f57f5341a9b878b7e2dde7e785>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-90040>

HTML: <https://flawdb.com/CVE-2026-90040> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-90040>
