CVE-2026-45987 PUBLISHED

KVM: nSVM: Sync interrupt shadow to cached vmcb12 after VMRUN of L2

Assigner: Linux
Reserved: 13.05.2026 Published: 27.05.2026 Updated: 27.05.2026

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

KVM: nSVM: Sync interrupt shadow to cached vmcb12 after VMRUN of L2

After VMRUN in guest mode, nested_sync_control_from_vmcb02() syncs fields written by the CPU from vmcb02 to the cached vmcb12. This is because the cached vmcb12 is used as the authoritative copy of some of the controls, and is the payload when saving/restoring nested state.

int_state is also written by the CPU, specifically bit 0 (i.e. SVM_INTERRUPT_SHADOW_MASK) for nested VMs, but it is not sync'd to cached vmcb12. This does not cause a problem if KVM_SET_NESTED_STATE preceeds KVM_SET_VCPU_EVENTS in the restore path, as an interrupt shadow would be correctly restored to vmcb02 (KVM_SET_VCPU_EVENTS overwrites what KVM_SET_NESTED_STATE restored in int_state).

However, if KVM_SET_VCPU_EVENTS preceeds KVM_SET_NESTED_STATE, an interrupt shadow would be restored into vmcb01 instead of vmcb02. This would mostly be benign for L1 (delays an interrupt), but not for L2. For L2, the vCPU could hang (e.g. if a wakeup interrupt is delivered before a HLT that should have been in an interrupt shadow).

Sync int_state to the cached vmcb12 in nested_sync_control_from_vmcb02() to avoid this problem. With that, KVM_SET_NESTED_STATE restores the correct interrupt shadow state, and if KVM_SET_VCPU_EVENTS follows it would overwrite it with the same value.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from cc440cdad5b7a4c1de12dace725209eb3e0cf663 to 1709418535a8df95532999d61b03d59975280258 (excl.)
  • affected from cc440cdad5b7a4c1de12dace725209eb3e0cf663 to 2f950eeb27af6885416232761700b8820cae0a61 (excl.)
  • affected from cc440cdad5b7a4c1de12dace725209eb3e0cf663 to 497f6af9679fc9c6ce2f438e11ed5d51b1aa8297 (excl.)
  • affected from cc440cdad5b7a4c1de12dace725209eb3e0cf663 to e0377e52f3c10ee572732d11b04625b7f517a862 (excl.)
  • affected from cc440cdad5b7a4c1de12dace725209eb3e0cf663 to 03bee264f8ebfd39e0254c98e112d033a7aa9055 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.8 is affected
  • unaffected from 0 to 5.8 (excl.)
  • unaffected from 6.6.140 to 6.6.* (incl.)
  • unaffected from 6.12.86 to 6.12.* (incl.)
  • unaffected from 6.18.27 to 6.18.* (incl.)
  • unaffected from 7.0.4 to 7.0.* (incl.)
  • unaffected from 7.1-rc1 to * (incl.)

References