docs(verifier): correct the acpi_tables_verified contract - #1159
Merged
Merged
Conversation
The doc on the response field says the opposite of what the code does:
/// It remains false for TDX lite, which replays ACPI DATA digests from
/// the event log without validating the table contents.
TDX lite has validated them since "verify TDX lite ACPI tables against the
declared VM shape" (7f63d5f): it recomputes the three RTMR0 ACPI DATA
digests from the declared VM shape, bails on any mismatch, and rebuilds
RTMR0 from the recomputed values, so host-reported table content never
reaches the expected measurement. verification.rs sets the flag true on both
TDX paths; the comment was not updated with the change.
This matters more than an ordinary stale comment because the field is part
of the verifier's response, so it is what someone reads to decide how much a
lite attestation actually proves. Reading it today leads to the conclusion
that lite skips the check entirely.
State what is true instead: both dstack TDX paths verify, and the flag is
false only where the check does not apply -- GCP TDX, which measures through
the vTPM, and the SEV-SNP and Nitro Enclave paths.
Also extend the note on expected_rtmr0_acpi_hashes. It was accurate but read
as if the lite path only ever replays the reported digests; say that the
verifier calls this on both paths and treats a mismatch, or a VM shape the
generator cannot model, as fatal.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are documentation-only and align with the current verifier implementation (the flag is set true in both dstack TDX verification paths and remains false on non-applicable platforms).
Pull request overview
This PR corrects verifier-facing documentation to accurately reflect how acpi_tables_verified is computed for dstack TDX attestations, ensuring relying parties interpret lite attestations correctly.
Changes:
- Update
VerificationDetails::acpi_tables_verifieddocs to state it is set on both dstack TDX paths (full-image and lite), and remains false only where ACPI verification is not applicable. - Clarify
expected_rtmr0_acpi_hashes()documentation to emphasize the verifier uses it to enforce (fail-closed) ACPI digest verification on both TDX paths.
File summaries
| File | Description |
|---|---|
| dstack/verifier/src/types.rs | Fixes the field contract documentation for acpi_tables_verified to match actual verifier behavior on both dstack TDX paths. |
| dstack/dstack-mr/src/tdx.rs | Clarifies that expected ACPI digest recomputation is enforced by the verifier (mismatch / unmodelable shapes are fatal). |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The problem
VerificationDetails::acpi_tables_verifieddocuments the opposite of what the code does:TDX lite has validated them since 7f63d5f (verify TDX lite ACPI tables against the declared VM shape).
verify_os_image_hash_for_dstack_tdx_litereads the three named RTMR0 ACPI DATA digests from the event log, recomputes them withexpected_rtmr0_acpi_hashes()from the declared VM shape, bails on any mismatch, and then rebuilds RTMR0 from the recomputed digests — so host-reported table content never reaches the expected measurement.verification.rssets the flag true on both TDX paths (lines 984 and 1057); only the comment was left behind.Why it is worth a PR
This field is part of the verifier's response. It is precisely what someone reads to decide how much a lite attestation proves, and today it tells them the ACPI check is skipped. I hit this myself while auditing the ACPI measurement chain and concluded — wrongly — that
RTMR0's ACPI entries were unconstrained under lite.What changed
Two doc comments, no code.
verifier/src/types.rs— state that both dstack TDX paths verify, and that the flag is false only where the check does not apply: GCP TDX (measures through the vTPM), SEV-SNP, and Nitro Enclave. Confirmed by tracing every assignment:verify_os_image_hash_for_dstack_tdxandverify_os_image_hash_for_dstack_tdx_liteset it;verify_os_image_hash_for_gcp_tdxand the SNP/Nitro paths do not.dstack-mr/src/tdx.rs— the note onexpected_rtmr0_acpi_hasheswas accurate but read as if the lite path only ever replays reported digests. Added that the verifier calls it on both paths and treats a mismatch, or a VM shape the generator cannot model, as fatal rather than unverified.Testing
cargo check -p dstack-verifier -p dstack-mrandcargo fmt --checkclean. Documentation only; no behaviour change.