DEV Community

yutianle
yutianle

Posted on

How to close CVE-2026-99312 by disabling nested virtualization safely

How to close CVE-2026-99312 by disabling nested virtualization safely

A hypervisor patch is the durable fix for CVE-2026-99312. When a production host cannot be rebooted into a fixed kernel immediately, disabling nested virtualization is the mitigation supported by the public research. The control is narrow, but it can interrupt platform customers, so it needs a planned change rather than a blind module edit.

Why this control works

The reported flaw is reachable when an AMD KVM host lets a guest run an L2 virtual machine. The INIT reset path mishandles the nested page table pointer when L2 is active with paging disabled. A guest that cannot create that nested context cannot reach the condition described by Terra Security.

Terra says many providers were not vulnerable because they did not enable nested virtualization on AMD. That statement gives operators a direct mitigation. It also sets the boundary: the issue is not closed by blocking one guest process or changing an application setting.

Confirm the current state

First verify that the host uses an AMD processor and runs KVM. Then inspect the running kvm_amd nested parameter, often exposed at /sys/module/kvm_amd/parameters/nested. Confirm the command and module name against the distribution's documentation before applying a change to a production host.

Do not rely only on the desired state in configuration management. A prior manual load, emergency change, or host image may have enabled nested virtualization. Record the value before the change and capture the affected kernel build.

Understand the blast radius

Nested virtualization supports workloads such as development clouds, CI runners, security labs, virtual desktop platforms, and customer-managed hypervisors. Before disabling it, identify guests that create KVM, Xen, Hyper-V, or other virtual machines. Ask the workload owner how the guest behaves when the feature disappears.

Some applications will fail at startup. Others may remain available while a background workflow breaks. Include these dependent services in the test plan. A host-level control can look successful while a tenant loses a required platform capability.

Apply a reversible change

For a persistent setting on many Linux distributions, the module option can be written as options kvm_amd nested=0 in a modprobe configuration file. Distribution packaging and boot-time module loading vary, so follow the host vendor's procedure. A running module may need to be unloaded or a host reboot may be required.

Because unloading KVM affects every active guest, treat the change as a hypervisor maintenance action. Drain or migrate workloads where possible, preserve the previous setting, and record the exact boot or module command used. Do not assume a live setting will survive the next reboot unless it is written to persistent configuration.

Validate from the host and the tenant

After the change, confirm that the running parameter is 0 and that guest creation policies no longer expose nested virtualization. Test an approved guest that should be blocked. Then test a workload that does not need nested virtualization to make sure ordinary VM operations still work.

Check the hardware-assisted virtualization controls presented to guests and the platform's own API or management interface. A tenant may see a cached capability or an outdated image. Validation should cover the actual request path, not only the host file.

Replace the mitigation with a patch

Upstream fixed releases include Linux 7.3.5, 6.18.64, and 6.12.118. The main fix is commit c7c288d178cb0b78d3464a616b16b1aa0b316049. Distributions may backport it, so the installed kernel package and the vendor advisory both matter.

After the host boots a fixed kernel, the nested-virtualization setting can be restored if the business needs it. Re-enable it through a reviewed change, verify the running parameter, and confirm that the guest capability works. Keep the fixed-kernel evidence separate from the temporary mitigation evidence.

Monitor the exception

A security exception should state which hosts are affected, who owns them, which tenants need nested virtualization, the planned patch date, and the business impact of keeping the feature disabled. Review the exception on a fixed schedule.

ThaiCERT reports CVSS v3.1 8.8. The reviewed sources do not confirm exploitation in the wild. That finding affects urgency and incident response, but it does not make a known vulnerability harmless. A future exposure report can change the risk quickly.

Exposure context

The ZoomEye search app="KVM" returned 10,738 product fingerprints. The CVE filter returned 0. The count does not show whether a host has nested virtualization enabled or which mitigation is active. Use it for broad discovery, then rely on hypervisor inventory and the running module parameter.

Operational checklist

  1. Verify AMD hardware and KVM.
  2. Capture the running kernel and nested setting.
  3. Identify tenants that need nested virtualization.
  4. Drain or schedule the host.
  5. Apply the persistent nested=0 configuration.
  6. Reload the module or reboot.
  7. Verify host and tenant behavior.
  8. Patch to a fixed kernel.
  9. Re-enable nested virtualization through a new change.
  10. Close the exception with current evidence.

The temporary control buys time only when it is real, verified, and scheduled for replacement. A change ticket that never reaches the hypervisor does not reduce the attack surface.

References

Top comments (0)