Skip to content

Attest with the boot disk's GPT digests; kernel 7.2.11; UKI version from the commit - #22

Merged
HarryR merged 6 commits into
mainfrom
gpt-digest
Nov 18, 2026
Merged

HarryR merged 6 commits into
mainfrom
gpt-digest

Conversation

@HarryR

@HarryR HarryR commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Part of the GCP release changeset: with lockboot/stage0#14, lockboot/stage2#5 and lockboot/workspace#6, on top of vaportpm v0.4.1 (lockboot/vaportpm#12).

GPT digests in the attestation

  • stage1 finds the boot disk (stage2's find_boot_device rules, duplicated for now), reads its GPT and passes H(UEFI_GPT_DATA) (sha256 + sha384) to vaportpm's attest(), which now requires it. A verifier uses it to replay the PCR the firmware's EV_EFI_GPT_EVENT extended (PCR5; PCR2 on GCE TDX) after stage2 has rewritten the GPT.
  • vaportpm-attest pinned to the v0.4.1 release (157ec04, guard =0.4.1). make update-vaportpm re-resolves Cargo.lock after changing the rev.

Kernel

  • Fedora CoreOS stable 44.20261023.3.1: kernel 7.0.12-201 -> 7.2.11-200.fc44, systemd-boot stub 259.6-1 -> 259.10-1.fc44. Fixes picked up include a container escape in IP fragment handling (7.0.14), CVE-2026-68480 (Safe-RET bypass, AMD) and CVE-2026-80590 (IP fragment reassembly panic).
  • Kernel 7.2 has no crypto/hkdf.ko (nvme-auth no longer depends on it): dropped from the initramfs module list and from init, which otherwise stops the boot.
  • build.sh extracts exactly the kernel RPMs fedora-deps.mk pins instead of kernel-core-*.rpm, and update-fedora-deps removes the previous versions' RPMs. Before, a bump without a clean rebuilt the old kernel silently.

UKI version string

  • The os-release embedded in the UKI carried the build date's yy.mm, so a commit built a different UKI in a different month. It is now the committer date (UTC) of the commit being built.
  • Its Fedora tag is the dist tag of the kernel fedora-deps.mk pins (fc44); it was a hardcoded fc41.

Release tooling

  • CI: the release job creates the release as a draft with its assets, then publishes it (an immutable release takes no uploads after it is published).
  • release-docker gains docker/setup-qemu-action (it builds linux/arm64 layers on an amd64 runner).
  • The uki-<arch> artifact, and so the release zip, is flat again: the build job collects the release files into one directory. Since build/<arch>/stage2 joined the upload list the artifact had been rooted at the repo root, and release-docker's download into tools/build-uki/<arch> would have nested the files where Dockerfile.runtime does not look. The release job still extracts each zip into contents/<arch>, so attestation subjects stay distinct (<arch>/<file>).
  • tools/publish.sh removed: it uploaded every UKI to the same object name and printed a _stage1 snippet stage0 rejects. lockboot-deploy create replaces it.

Tested

  • make ci; workspace make selftest, x86_64 and aarch64, with 7.2.11 confirmed in the boot logs.
  • CI's artifact is flat, and every file in it is byte-identical to the local build on both arches. UKIs: x86_64 fecbe639b4bb9fa0, aarch64 fef50d8d91a5510f.
  • GCP release gate (workspace tools/cloudtest, 2026-11-18, run be236c1f6330) on n2d SEV, n2d SEV-SNP and c3 TDX with the UKI as it was before the version-string change (e0bc2bbc860aa046; not re-run): on both payload boots the attestation verifies against Google's root, its nonce is sha256(stage2), and the quoted PCRs replay against the golden platform file with the attested GPT digest.

Not tested

  • The release jobs (draft-then-publish, release-docker): they run only on a tag.

🤖 Generated with Claude Code

The firmware measures the boot disk's GPT (EV_EFI_GPT_EVENT: PCR5, PCR2 on
GCE TDX) and stage2 rewrites it, so a verifier needs the digests to replay
that PCR after a first boot. stage1 finds the boot disk (stage2's
find_boot_device rules, duplicated: the one disk with the data partition,
else the one with an ESP), reads its GPT and passes H(UEFI_GPT_DATA) to
vaportpm's attest(), which now requires it.

- Pin vaportpm-attest to lockboot/vaportpm#13 (gpt-digest, unreleased).
- `make update-vaportpm`: re-resolve Cargo.lock after changing the rev.

Tested: test-chain x86_64 + aarch64; stage2 pivot reboot test under QEMU
and on GCP c3-standard-4 TDX (boot 2 attests the rewritten GPT; PCR2
replays from it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HarryR and others added 4 commits November 15, 2026 12:31
Repin from the unreleased lockboot/vaportpm#13 commit (8b2c35c) to the
v0.4.1 release commit 157ec04, guard =0.4.1. Since 8b2c35c: the
attest CLI's --disk flag and boot-disk detection, and the 64 KiB cap on
the GPT entry array, which stage1's uefi_gpt_data_device() read now
gets. Cargo.lock: only the vaportpm-attest entry (make update-vaportpm).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
action-gh-release with draft: false publishes the release before
uploading its assets; an immutable release accepts no uploads once
published, so the first tagged release would ship empty (vaportpm v0.4.0
did, vaportpm#14). Create it as a draft with the assets, then publish
with `gh release edit --draft=false`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nned RPMs only

- fedora-deps.mk: kernel 7.0.12-201 -> 7.2.11-200.fc44, systemd-boot stub 259.6-1 ->
  259.10-1.fc44 (make update-fedora-deps FCOS=44.20261023.3.1 SYSTEMD=259.10-1.fc44).
- Kernel 7.2 has no crypto/hkdf.ko (nvme-auth no longer depends on it): dropped from the
  initramfs module list and from init, which stopped the boot at 'modprobe: hkdf failed'.
- build.sh extracts exactly the kernel RPMs fedora-deps.mk pins instead of
  kernel-core-*.rpm, and takes the module directory from the same pin. A bump left the
  previous RPMs in the build dir and the wildcard picked the old kernel silently.
- update-fedora-deps.py removes the previous versions' RPMs and the files derived from
  them.

Tested: workspace make selftest, both arches, 7.2.11 in every boot log; a build with
stray old-version RPM files present gives the same UKI; update-fedora-deps removes them.

Co-Authored-By: Claude <noreply@anthropic.com>
… job

- tools/publish.sh uploaded every UKI to the same object name, so a new release
  overwrote the one running instances pin by sha256, and it printed a _stage1 snippet
  stage0 rejects (https, no payload wrapper). lockboot-deploy create replaces it.
- release-docker builds linux/amd64,linux/arm64 and Dockerfile.runtime's builder stage
  runs commands per platform: add docker/setup-qemu-action, as stage0 and stage2 have.
  Untested until a tag.

Co-Authored-By: Claude <noreply@anthropic.com>
@HarryR HarryR changed the title stage1: attest with the boot disk's GPT digests Attest with the boot disk's GPT digests; kernel 7.2.11 Nov 18, 2026
@HarryR
HarryR marked this pull request as ready for review November 18, 2026 09:26
…er-arch artifact

The os-release embedded in the UKI carried the build date's yy.mm, so a
commit built a different UKI in a different month, and a hardcoded
"fc41" / "Fedora 41" on an fc44 kernel. The yy.mm is now the committer
date (UTC) of the commit being built, passed in by the Makefile (the
build image has no git); build.sh refuses to run without it. The Fedora
tag is the dist tag of the kernel fedora-deps.mk pins.

The uki-<arch> artifact is flat again. Since build/<arch>/stage2 joined
the upload list, upload-artifact rooted the artifact at the repo root,
so release-docker's download into tools/build-uki/<arch> would have
nested the files where Dockerfile.runtime does not look. The build job
now collects the release files into one directory and uploads that. The
release job still extracts each zip into contents/<arch>, so attestation
subjects stay distinct: <arch>/<file>.

Tested: the x86_64 UKI is byte-identical to the previous build with the
date change alone, and follows a forced COMMIT_YEAR_MONTH; both UKIs
embed VERSION_ID=26.11.fc44; workspace `make selftest` passes on both
arches. Not tested: the artifact layout (the next CI run shows it) and
release-docker (first runs at a tag).

Co-Authored-By: Claude <noreply@anthropic.com>
@HarryR HarryR changed the title Attest with the boot disk's GPT digests; kernel 7.2.11 Attest with the boot disk's GPT digests; kernel 7.2.11; UKI version from the commit Nov 18, 2026
HarryR added a commit to lockboot/stage0 that referenced this pull request Nov 18, 2026
…ithout a debug record; publish scripts verify the release tag (#14)

Part of the GCP release changeset: with lockboot/stage1#22,
lockboot/stage2#5 and lockboot/workspace#6, on top of vaportpm v0.4.1
(lockboot/vaportpm#12).

**PCR replay**
- `predict-pcrs.py` marks stage0's EV_EFI_GPT_EVENT `"from_attestation":
"gpt"`, so workspace pcr-replay takes that event's digest from the
attestation and reproduces PCR5 (PCR2 on GCE TDX) on every boot, not
only before stage2 rewrites the GPT. `pcrs.json` stays the first-boot
reference.

**Reproducible build**
- The UEFI targets link with `/DEBUG:NONE`. CI's `stage0.efi`, `ena.efi`
and `gvnic.efi` each differed from a local build of the same commit in 8
bytes: the GUID of the linker's debug record, a hash of the `.pdb`,
which records where the toolchain is installed (`/tmp/.rustup` in CI,
`/src/.rustup` locally). The Authenticode hash and PCR4 differed with
it. No `.pdb` is written now and the image carries no debug record. This
changes the measured stage0 binary.
- `os-release`'s `yy.mm` version is the committer date (UTC) of the
commit being built, not the build date.

**Release and publish tooling**
- CI: the release job creates the release as a draft with its assets,
then publishes it. Publishing first leaves an immutable release empty,
as vaportpm v0.4.0 was (lockboot/vaportpm#14).
- `tools/publish/{ec2,gcp}/create.sh`, release path: `gh attestation
verify` gains `--source-ref refs/tags/<version>` (the provenance must
come from a build of that tag), and `gh release verify-asset` checks the
zip is an asset of the immutable release.
- Both scripts read `os-release` as data instead of sourcing it.

**Tested**
- Workspace `make selftest`, x86_64 and aarch64.
- CI's build equals the local build on both arches: PCR4 in `pcrs.json`
is identical, and the body of CI's signed `BOOT*.EFI` is byte-identical
to the local unsigned `stage0.efi` (PCR7 differs: the Secure Boot keys
are minted per build).
- GCP release gate (workspace `tools/cloudtest`, 2026-11-18, run
be236c1f6330) on n2d SEV, n2d SEV-SNP and c3 TDX, with the image built
from this branch: stage1's attestation verifies and every PCR replays
against the golden platform files on both payload boots. The gate ran
before the debug record was removed and is not re-run.
- The two `gh` checks against lockboot/vaportpm v0.4.1 (its tag passes;
another tag and refs/heads/main fail); the os-release parser on a good,
a hostile and an incomplete file.

**Not tested**
- `create.sh <arch> <tag>` end to end and the draft-then-publish release
job: both need this repo's first tag.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@HarryR
HarryR merged commit 64690fe into main Nov 18, 2026
5 checks passed
@HarryR
HarryR deleted the gpt-digest branch November 18, 2026 16:01
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