CVE-2021-46978: KVM: nVMX: Always make an attempt to map eVMCS after migration
In the Linux kernel, the following vulnerability has been resolved:
KVM: nVMX: Always make an attempt to map eVMCS after migration
When enlightened VMCS is in use and nested state is migrated with
vmx_get_nested_state()/vmx_set_nested_state() KVM can't map evmcs
page right away: evmcs gpa is not 'struct kvm_vmx_nested_state_hdr'
and we can't read it from VP assist page because userspace may decide
to restore HV_X64_MSR_VP_ASSIST_PAGE after restoring nested state
(and QEMU, for example, does exactly that). To make sure eVMCS is
mapped /vmx_set_nested_state() raises KVM_REQ_GET_NESTED_STATE_PAGES
request.
Commit f2c7ef3ba955 ("KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES
on nested vmexit") added KVM_REQ_GET_NESTED_STATE_PAGES clearing to
nested_vmx_vmexit() to make sure MSR permission bitmap is not switched
when an immediate exit from L2 to L1 happens right after migration (caused
by a pending event, for example). Unfortunately, in the exact same
situation we still need to have eVMCS mapped so
nested_sync_vmcs12_to_shadow() reflects changes in VMCS12 to eVMCS.
As a band-aid, restore nested_get_evmcs_page() when clearing
KVM_REQ_GET_NESTED_STATE_PAGES in nested_vmx_vmexit(). The 'fix' is far
from being ideal as we can't easily propagate possible failures and even if
we could, this is most likely already too late to do so. The whole
'KVM_REQ_GET_NESTED_STATE_PAGES' idea for mapping eVMCS after migration
seems to be fragile as we diverge too much from the 'native' path when
vmptr loading happens on vmx_set_nested_state().
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel KVM virtualization flaw in nested VMX state handling after migration. On affected systems using enlightened VMCS, KVM may fail to remap required nested virtualization state correctly. The CVSS score is high, but exposure appears concentrated on Linux virtualization hosts using this specific KVM nested virtualization path.
Executive priority
Treat as a high-priority virtualization host patching item, not a broad internet-exposed emergency. Prioritize platforms running nested KVM workloads, CI virtualization, lab clouds, or customer-hosted VM environments where local tenant access exists.
Technical view
The issue is in KVM nVMX handling of eVMCS after vmx_get_nested_state()/vmx_set_nested_state() migration. Clearing KVM_REQ_GET_NESTED_STATE_PAGES during nested_vmx_vmexit() could leave eVMCS unmapped when nested_sync_vmcs12_to_shadow() needs to synchronize VMCS12 changes. The referenced kernel stable commits restore an attempt to map the eVMCS page.
Likely exposure
Most likely exposed systems are Linux KVM hosts running affected kernel versions and using nested VMX with enlightened VMCS, especially where nested VM state is migrated. General Linux servers without KVM nested virtualization are less likely to be exposed based on the source description.
Exploitation context
The source bundle marks this CVE as not in KEV, and no provided source states active exploitation. The CVSS vector requires local access with low privileges and no user interaction, with high confidentiality, integrity, and availability impact.
Researcher notes
Evidence is limited to the CVE record and kernel stable references. The affected path involves fragile post-migration eVMCS mapping rather than a remotely reachable service. Validate exposure by kernel lineage, distro backports, KVM nested VMX configuration, and whether migration of nested state occurs.
Mitigation direction
Update affected Linux kernels using vendor-supported packages or stable fixes referenced by the CVE.
Prioritize KVM hosts that enable nested virtualization or migrate nested VM state.
Check Linux distribution advisories for exact fixed package versions and backport status.
Review whether nested VMX or enlightened VMCS is required on production virtualization hosts.
Validation and detection
Inventory Linux kernel versions on KVM virtualization hosts.
Identify hosts with nested virtualization enabled and VM migration workflows in use.
Confirm vendor kernel packages include the referenced stable fixes.
Retest relevant nested virtualization migration workflows after patching.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-46978 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
2ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.