Repository navigation
feat(attest): every VM boots the EDK2 line's OVMF with SMM and Secure Boot, PCR 0 is the same at every size, nothing on the ESP changes a boot unnoticed, and vm.ovmf is removed - #313
Merged
Conversation
Published Helm chart
|
| Chart | vm-manager |
| Version | 0.29.17-r3d52ab65t20261201004845h49191c8 |
| OCI reference | oci://gsoci.azurecr.io/charts/giantswarm/vm-manager:0.29.17-r3d52ab65t20261201004845h49191c8 |
| Digest | sha256:bb49b6013429ec2df5022f21b4841864a3d10063e2696dbf4a2249b7ef50dcc0 |
| Registry | public — gsoci.azurecr.io |
| Git catalog | giantswarm-test-catalog (index) |
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/vm-manager --version 0.29.17-r3d52ab65t20261201004845h49191c8Posted by architect-orb · build 6164 · commit 49191c8 · updated in place on every push
teemow
marked this pull request as draft
November 29, 2026 00:51
teemow
force-pushed
the
fix-attestation-secureboot
branch
6 times, most recently
from
December 1, 2026 00:20
2854167 to
f863992
Compare
…s a boot unnoticed The image signs its UKI, the kernel in it and systemd-boot with the image key and says so in policy.json (secure_boot). vm-manager enrolls the image certificate as PK, KEK and db before every start and boots the Secure Boot build of OVMF, with SMM where its QEMU firmware descriptor asks for it, so systemd-stub ignores a command line a loader entry passes. The installer seals no credentials onto the ESP (vm-manager passes them over SMBIOS on every boot) and the image turns off the pcrlock notification that would write one, so PCR 12 holds only bound events: the verifier now rejects any credential or configuration extension archive. The initrd quote covers PCR 13 and accepts only zero or the os-separator, so an extension image on the ESP fails the quote that releases user-data. The release's golden recording boots the Secure Boot firmware. Closes #293.
teemow
force-pushed
the
fix-attestation-secureboot
branch
from
December 1, 2026 00:47
f863992 to
02f46ca
Compare
…e, pinned by digest, always with SMM and Secure Boot The Dockerfile's firmware stage fetches the line's OVMF artifact (gsoci.azurecr.io/giantswarm/edk2-ovmf, a reproducible SMM, Secure Boot and TPM 2.0 build) by tag and digest, checks manifest and images against them, and the image ships it under /usr/share/vm-manager/firmware instead of Ubuntu's ovmf-generic. The line carries the fixes that keep PlatformPei from writing into the PEI volume before Tcg2Pei measures it, so PCR 0 no longer depends on the VM's CPU count, memory or reboots. Renovate tracks tag and digest; `make firmware` fetches the same files for a host, the e2e tests and the smoke boot. Every VM boots that firmware with SMM and the image certificate as PK, KEK and db: no firmware probe, no setup mode. create_vm refuses an image without a certificate or secure_boot, a VM installed from such an image does not start, and the chart's vm.ovmf values are gone. get_host names the build from its firmware.json.
teemow
force-pushed
the
fix-attestation-secureboot
branch
from
December 1, 2026 01:50
02f46ca to
49191c8
Compare
teemow
marked this pull request as ready for review
December 1, 2026 01:50
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #293, after #302 and #350.
Problem
Root on a node can write the ESP. With Secure Boot off, systemd-stub boots the command line a loader entry's
optionspasses instead of the UKI's own, soipe.enforce=0turns IPE off on the next boot. #302 makes that fail attestation, and #350 kills the boot, but the initrd ran with it until its quote. The ESP reaches the initrd in two more ways #302 cannot judge:PCR 0 also depended on the VM: OVMF's PEI code writes into its own firmware volume before Tcg2Pei measures it. So one golden value did not fit every VM size, or a VM's reboots.
Change
Dockerfilepins it by tag and digest:gsoci.azurecr.io/giantswarm/edk2-ovmf:edk2-stable202611-gs.5@sha256:22ca05b3….firmware/fetch.shchecks the manifest and both images against it. The container image ships them under/usr/share/vm-manager/firmware, andmake firmwarefetches the same files on a host.ovmf-generic, the firmware probe and the chart'svm.ovmfvalues are gone.images/scripts/verifychecks both signatures withsbverify. sbsigntools is now installed in the image build container, which fixes this PR's earlier failing check.smm=onand a secure variable store flash.create_vmrefuses an image without a certificate or withoutsecure_boot. A VM installed from such an image does not start.optionsno longer take effect, and the boot is still refused because systemd-boot measured them.hack/guest-image-golden.sh).Breaking (0.30):
vm.ovmf.codeandvm.ovmf.varsare removed. VMs installed from a guest image withoutsecure_bootdo not start; delete and recreate them from a current image.Acceptance criteria
TestKernelCommandLineAttestation).55d980d7…at 1 vCPU and 1 GiB, 4 and 4 GiB, 8 and 2 GiB, 16 and 2 GiB, and the e2e suite's VMs of different sizes and their reboots all verify against one recorded value.images/README.mdno longer lists the ESP among what is not covered.Tested
go test ./...,go vetwith thee2etag,golangci-linton the code and one2e/,hack/verify-chart.sh, and shellcheck onfirmware/fetch.sh: pass.workflow_dispatch, suite full) on this branch, on top of feat(attest): every boot is attested or killed; --attestation, --attestation-learn-golden, vm.attestation, vm.learnGolden and create_vm's require_attestation are removed, and golden values come from a reference boot of vm-manager image golden #350: all 22 tests pass. Among themTestKernelCommandLineAttestation(Secure Boot enabled, options measured and refused, credential and extension image refused),TestAttestation(tamper on a distribution's Secure Boot OVMF:golden mismatchon PCR 0),TestKubernetesCluster,TestHostIsolationandTestRestart. The recorded golden PCR 0 is55d980d7….hack/guest-image-golden.sh, PCR 055d980d7….agentlab vm-manager-testpasses: a 1 vCPU, 1 GiB VM verifies at both stages against the values recorded at 2 vCPUs, IPE enforces, and the pod reports the firmwareOVMF edk2-stable202611-gs.5. A 4 vCPU VM quotes the same PCR 0, and the guest reportsSecure Boot: enabled (user). After root appendsoptions … ipe.enforce=0to its loader entry, the next boot is refused at its initrd quote on PCR 12 and the VM is failed, never ready.