Repository navigation
attest: carry the boot disk's GPT digests - #13
Merged
Merged
Conversation
The firmware measures the boot disk's GPT as EV_EFI_GPT_EVENT (PCR5; PCR2 on GCE TDX), and stage2 rewrites that GPT, so a verifier cannot replay the PCR from release artifacts after a first boot. The attestation now carries H(UEFI_GPT_DATA) in sha256 and sha384, read from the disk (not the firmware event log, which not every platform hands to Linux intact). - gpt module: UEFI_GPT_DATA as EDK2 builds it (92-byte header, UINT64 count, non-empty entries), from a block reader or a device/image path. - AttestationOutput.gpt is required; attest()/attest_with() take it; the CLI is `attest <DISK> [NONCE_HEX]`. - vaportpm-verify's CLI outputs gpt next to the verified PCRs. The quote does not cover it: a replay uses it and is checked against the quoted PCR. The flat (zkVM) format is unchanged. - Test fixtures predate the field and get an all-zero gpt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 14, 2026
…ry array The CLI is `attest [--disk <DISK>] [NONCE_HEX]` again with the nonce as the only positional argument, as on main: the earlier `<DISK>` positional turned an existing `attest <nonce>` into an open of a "disk" named after the nonce. Without --disk, bootdisk::boot_disk() picks the one whole disk whose GPT has an EFI System Partition; zero or several is an error naming --disk. A wrong pick fails the PCR replay, not trust. No efivarfs: the firmware's boot options (GCE's are short-form NVMe paths) carry no partition to match, and lockboot never writes its own. uefi_gpt_data now rejects an entry array over 64 KiB (4x the usual 128 x 128) and an overflowing PartitionEntryLBA * sector: the header is untrusted once every attached disk is parsed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o.lock - Both crates to 0.4.0: #13 breaks the API (attest(nonce, &gpt), the required gpt field, the CLI). - CI gains build-x86_64 / build-aarch64 (make release-x86 / release-aarch64) on every push and PR. A v* tag adds a release job: vaportpm-{attest,verify}-{x86_64,aarch64}-linux-musl, one build-provenance attestation over all four (subject-checksums), an immutable release. Procedure: workspace RELEASING.md. - Cargo.lock is committed and every build/check/test/clippy runs --locked, so a tag fixes its binaries' dependencies; `make lock` re-resolves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HarryR
marked this pull request as ready for review
November 15, 2026 11:54
HarryR
added a commit
to lockboot/stage1
that referenced
this pull request
Nov 15, 2026
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>
Closed
3 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 nothing yet; first part of #12.
The attestation gains a required
gptfield: the boot disk's H(UEFI_GPT_DATA) in sha256 and sha384, read from the disk rather than the firmware event log. It is replay input for the PCR the firmware's EV_EFI_GPT_EVENT extended (PCR5; PCR2 on GCE TDX); the quote covers that PCR, so a wrong value fails the replay.gptmodule (UEFI_GPT_DATA as EDK2 builds it), unit-tested against workspace pcr-replay'sgpt_data().attest(nonce, &gpt),attest_with(tpm, nonce, &gpt, fetcher); CLIattest [--disk <DISK>] [NONCE_HEX]; without --disk,bootdisk::boot_disk()picks the one disk with an EFI System Partition (zero or several is an error).uefi_gpt_datacaps the partition entry array at 64 KiB and checks the entry offset: the header is untrusted.gptnext to the verified PCRs. Flat/zkVM format unchanged (vaportpm-zk needs no change).Consumers: stage1 (computes the digests before it attests), stage0's predict-pcrs.py and workspace pcr-replay (
from_attestation: gpt). Not yet tested on hardware.Release (0.4.0):
make release-x86/release-aarch64). A v* tag adds a release job:vaportpm-{attest,verify}-{x86_64,aarch64}-linux-musl, one build-provenance attestation over the four, an immutable release. Procedure: workspace RELEASING.md (workspace#6).make lockre-resolves.🤖 Generated with Claude Code