[STACKED on #851] fix(simulator): replay measured NitroTPM boot PCRs - #960
Merged
kvinwang merged 1 commit intoAug 6, 2026
Conversation
kvinwang
force-pushed
the
codex/fix-vmm-simulated-nitrotpm-measurement
branch
from
August 6, 2026 01:32
fbd2454 to
e09a4c6
Compare
kvinwang
merged commit Aug 6, 2026
563b48a
into
codex/fix-vmm-cloud-image-measurements
3 checks passed
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.
Problem
The development NitroTPM simulator did not reproduce the AWS boot measurement. Its swtpm PCR4/7/12 remained zero, and the simulated NSM attestation document reported hard-coded zero PCRs. The previous version of this PR worked around that mismatch by replacing the image's real AWS measurement and
os_image_hashwith a synthetic all-zero identity.That made the simulator internally consistent, but it no longer attested the image that was actually booted.
Fix
Preserve the release image's assemble-time
measurement.aws.cborand unifiedos_image_hash, and reproduce the corresponding AWS boot PCR state in the simulator:nitro-tpm-pcr-computetool;measurement.aws.replay.jsonduring image assembly;sha256sum.txtand include it in image archives;The VMM also verifies that the replay document's final PCRs produce the same
boot_pcr_digestasmeasurement.aws.cbor.Changed areas
os/image: replay artifact generation, validation, packaging, and documentationdstack-types: typed replay documentvmm: image loading and simulator-only transport while preserving the real image identitytee-simulator: PCR replay and live-PCR NSM evidencetpm2: stream transport support for the simulator's swtpm socketDependency and merge order
codex/fix-vmm-cloud-image-measurementsVerification
cargo check -p dstack-types -p dstack-vmm -p dstack-tee-simulatorcargo test -p dstack-vmm -p dstack-types -p dstack-tee-simulator --no-runcargo fmt --allgit diff --check