fix(prepare): disable KVM nested virtualization (CVE-2026-53359)#60
fix(prepare): disable KVM nested virtualization (CVE-2026-53359)#60Andrei Kvapil (kvaps) wants to merge 1 commit into
Conversation
Ship an /etc/modprobe.d/cozystack-kvm-nested.conf drop-in (options kvm_intel/kvm_amd nested=0) on Ubuntu, RHEL and SUSE host-prep to mitigate CVE-2026-53359 (Januscape), a KVM guest-to-host escape reachable only when nested virtualization is exposed to the guest. Gated by cozystack_disable_kvm_nested (default true); opt out to re-enable nested virt. Signed-off-by: Andrei Kvapil <kvapss@gmail.com> Assisted-By: Claude <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a mitigation for CVE-2026-53359 by disabling KVM nested virtualization across RHEL, SUSE, and Ubuntu environments. It adds Ansible tasks to write a modprobe configuration file (/etc/modprobe.d/cozystack-kvm-nested.conf) that sets nested=0 for both Intel and AMD KVM modules, and includes a cleanup task to remove the file if the mitigation is disabled. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Disables KVM nested virtualization on generic (non-Talos) Ubuntu/RHEL/SUSE hosts prepared for Cozystack, to mitigate CVE-2026-53359 ("Januscape"), a guest-to-host escape in the Linux KVM/x86 shadow MMU (a use-after-free in
kvm_mmu_get_child_sp()from shadow-page role confusion).The vulnerable code path is only reachable when a guest is allowed to use nested virtualization; disabling it on the host removes the attack surface regardless of the node kernel patch level. Fixed upstream in
81ccda30b4e8/ stable 6.12.95, 6.6.144, 6.1.177, 6.18.38, 7.1.3 (2026-07-04).Changes
/etc/modprobe.d/cozystack-kvm-nested.confdrop-in (options kvm_intel nested=0/options kvm_amd nested=0) inexamples/{ubuntu,rhel,suse}/prepare-*.yml, written before thekvm_*module is loaded (mirrors the existing DRBD modprobe.d ordering). Both options are set so one drop-in covers Intel and AMD.cozystack_disable_kvm_nestedvariable (defaulttrue); a paired cleanup task removes the drop-in when opted out or when KubeVirt is disabled.kvm_intel/kvm_amdis already loaded, a reboot (or module reload) is required for the change to take effect.Part of a coordinated set of PRs (see Related PRs below).
Test plan
ansible-lintpassesansible-test sanitypassesVerified locally:
ansible-playbook --syntax-checkpasses on all three playbooks.ansible-lint/ live / idempotency not yet run — left for CI / reviewer.Related PRs
Coordinated CVE-2026-53359 (Januscape) nested-virtualization mitigation across Cozystack repos:
cozystack/genericpresets (canonical source)