fix(talos): bake KVM nested-virt off into boot assets (CVE-2026-53359)#3240
fix(talos): bake KVM nested-virt off into boot assets (CVE-2026-53359)#3240Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
Conversation
kvm_intel/kvm_amd are built into the Talos kernel, so nested= is only settable on the kernel command line. On UEFI/systemd-boot the cmdline is baked into the UKI, so a machine-config install.extraKernelArgs is ignored and the mitigation silently does not apply. Bake the args into the boot assets at image build via the imager profile customization, covering both GRUB (BIOS) and systemd-boot (UEFI). The imager rejects kernel-arg customization for the bare kernel/initramfs outputs, so only the boot-producing profiles carry it. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe gen-profiles.sh script now conditionally injects extraKernelArgs into generated profile YAMLs based on profile kind, disabling nested virtualization for non-kernel/initramfs profiles. Correspondingly, the installer, iso, metal, and nocloud profile YAMLs each add a customization.extraKernelArgs block with kvm_intel.nested=0 and kvm_amd.nested=0. ChangesNested virtualization mitigation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements a security hardening measure for Talos images to address the 'Januscape' vulnerability (CVE-2026-53359). By baking the necessary kernel arguments directly into the boot assets during the image build process, the changes ensure that nested virtualization is disabled on the host, preventing potential guest-to-host escapes. This approach is necessary because standard machine-config overrides are ineffective for kernel command-line arguments in certain boot configurations. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the Talos profile generation script (hack/gen-profiles.sh) and regenerates the corresponding profile YAML files (installer.yaml, iso.yaml, metal.yaml, and nocloud.yaml) to disable KVM nested virtualization (kvm_intel.nested=0 and kvm_amd.nested=0) as a mitigation for CVE-2026-53359 (Januscape). This customization is applied to all boot-producing profiles while excluding bare kernel and initramfs outputs. There are no review comments, and I have no 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.
What this PR does
Bakes
kvm_intel.nested=0/kvm_amd.nested=0into the Talos boot assets at image build (imager profilecustomization.extraKernelArgs), mitigating CVE-2026-53359 ("Januscape") — the KVM guest-to-host escape that is only reachable when nested virtualization is exposed to guests. Cozystack VMs never need nested virt, so it is disabled on the host.Why at image build rather than in the machine config:
kvm_intel/kvm_amdare built into the Talos kernel, sonested=is only settable on the kernel command line. On UEFI/systemd-boot the command line is embedded in the UKI, so a machine-configinstall.extraKernelArgsis silently ignored — the args must be baked into the boot assets. Baking covers both GRUB (BIOS) and systemd-boot (UEFI). The imager rejects kernel-arg customization for the barekernel/initramfsoutputs, so only the boot-producing profiles (installer, image, iso) carry it.hack/gen-profiles.shis the source of truth; the committed profiles were regenerated pinned to the current Talos version so the only change is the addedcustomizationblock (kernel/initramfsprofiles are untouched).Part of the coordinated CVE-2026-53359 mitigation across Cozystack repos.
Screenshots
N/A — no UI changes.
Release note
Summary by CodeRabbit