Skip to content

feat(cozystack): disable KVM nested virtualization in Talos skills (CVE-2026-53359)#17

Open
Andrei Kvapil (kvaps) wants to merge 2 commits into
mainfrom
security/cve-2026-53359-disable-nested-virt
Open

feat(cozystack): disable KVM nested virtualization in Talos skills (CVE-2026-53359)#17
Andrei Kvapil (kvaps) wants to merge 2 commits into
mainfrom
security/cve-2026-53359-disable-nested-virt

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Prescribes disabling KVM nested virtualization in the cozystack plugin's Talos skills, 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); no released Talos ships the fixed kernel yet.

Change

  • talos-bootstrap skill: the generated nodes/<name>.yaml overlay now sets kvm_intel.nested=0 and kvm_amd.nested=0 under machine.install.extraKernelArgs, and Phase 7 review verifies they are present.
  • talos-bootstrap reference (manual-steps.md): the node-config example documents the same.
  • cluster-upgrade reference (post-upgrade-checks.md): adds a post-upgrade check that the args are still on the kernel command line.

Placing the args under machine.install is deliberate: talm re-applies that section on every talm upgrade, so the mitigation survives OS image bumps (and each apply/upgrade reboots the node). Both args are set so one config covers Intel and AMD.

The canonical source is the cozystack talm preset (linked below); this repo makes the skills prescribe and verify it.

Part of a coordinated set of PRs (see Related PRs below).

Related PRs

Coordinated CVE-2026-53359 (Januscape) nested-virtualization mitigation across Cozystack repos:

…VE-2026-53359)

Prescribe kvm_intel.nested=0 and kvm_amd.nested=0 via machine.install.extraKernelArgs in the talos-bootstrap node overlay, add a Phase 7 review check and a post-upgrade verification, to mitigate CVE-2026-53359 (Januscape). Placing the args under machine.install makes talm re-apply them on every upgrade so the mitigation survives OS bumps.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Assisted-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kvaps, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49f99ff1-17e6-4ff8-a9fa-59dece8a639d

📥 Commits

Reviewing files that changed from the base of the PR and between 8e61ad5 and 3b4c8b8.

📒 Files selected for processing (3)
  • plugins/cozystack/skills/cluster-upgrade/references/post-upgrade-checks.md
  • plugins/cozystack/skills/talos-bootstrap/SKILL.md
  • plugins/cozystack/skills/talos-bootstrap/references/manual-steps.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch security/cve-2026-53359-disable-nested-virt

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements mitigations for CVE-2026-53359 by disabling KVM nested virtualization across the Talos bootstrap configuration, manual installation steps, and post-upgrade checks. The feedback correctly identifies an error in the post-upgrade verification command, which incorrectly uses 'talm' instead of 'talosctl' to read /proc/cmdline.

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.


# 6. CVE-2026-53359 mitigation survived the OS upgrade (nested virtualization still off).
# machine.install.extraKernelArgs is re-applied by `talm upgrade`; confirm per node:
talm -n <node-ip> read /proc/cmdline | grep -o 'kvm_intel.nested=[01]' # expect kvm_intel.nested=0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The command uses talm to read /proc/cmdline, but talm does not have a read command. Direct node file reading is performed using talosctl.

Suggested change
talm -n <node-ip> read /proc/cmdline | grep -o 'kvm_intel.nested=[01]' # expect kvm_intel.nested=0
talosctl -n <node-ip> read /proc/cmdline | grep -o 'kvm_intel.nested=[01]' # expect kvm_intel.nested=0

…lout (CVE-2026-53359)

kvm_intel/kvm_amd are built into the Talos kernel, so nested= is settable only from the kernel command line. Pin grubUseUKICmdline=false (Talos >=1.12) so extraKernelArgs land on the built cmdline, and note the args take effect via talm upgrade, not a plain apply.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Assisted-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant