Skip to content

feat: use complete TDINFO hash for TCB mappings - #1032

Open
haitaohuang wants to merge 3 commits into
intel:mainfrom
haitaohuang:tcbmapping
Open

feat: use complete TDINFO hash for TCB mappings#1032
haitaohuang wants to merge 3 commits into
intel:mainfrom
haitaohuang:tcbmapping

Conversation

@haitaohuang

@haitaohuang haitaohuang commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Implement the one-hash TCB mapping design proposed in #908:

  • use SHA384(TDINFO) over the complete unmasked TDINFO as the mapping key;
  • break the RTMR2 circular dependency by measuring canonical policyData with only servtdTcbMapping redacted;
  • verify the signed mapping with the RTMR1-bound policy issuer chain;
  • authenticate migration and rebinding continuity through SERVTD_EXT rather than host-supplied Init_TDINFO;
  • resolve source initial/current hashes through the authenticated source JSON mapping and reject lookup misses, SVN rollback, and nonzero SERVTD_ATTR;
  • preserve cumulative mapping history in migtd-hash, including multiple release hashes assigned to the same SVN.

The legacy outer policy signature is ignored because policy integrity is established by RTMR2. The existing wire Init_TDINFO field remains for framing compatibility but is no longer used as authorization evidence.

Related to #908.

Validation

  • format, cargo check, clippy, cargo-deny, library build, and library tests;
  • all 32 firmware build combinations and all six standalone tool builds;
  • all 14 emulation workflow scenarios;
  • all five workflows triggered on the fork branch: Format and Clippy, Library Crates, Fuzzing Test, main, and Integration (Emulation Mode).

Future changes

Potential follow-up work, intentionally excluded from this focused series:

  • replace raw policy-chain measurement with a stable RTMR1 trust anchor based on a root certificate and signer-purpose EKU;
  • support direct trust-anchor enrollment and signer revocation through CRLs;
  • support CoRIM TCB endorsements, including policies that use CoRIM without JSON servTD collateral;
  • make servTD identity collateral optional where SVN-only evaluation is sufficient;
  • add release tooling and coverage for independent policy, mapping, and identity signer rotation;
  • strengthen two-phase measurement generation and hash-stability checks across release workflows.

Use SHA-384 over the complete unmasked TDINFO as the Policy v2 mapping key. Canonicalize policyData once with only the circular mapping removed so runtime verification and offline tooling extend identical RTMR2 bytes.

Verify the signed mapping with the RTMR1-bound policy issuer chain, remove the separate mapping chain and obsolete mapping identity fields, and ignore the legacy outer policy signature as required by the proposal.

Resolve the source's initial and current SERVTD_EXT hashes through its authenticated JSON mapping, allowing an older destination to accept a newer source release without predicting its hash.

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Carry authenticated SERVTD_EXT continuity evidence through migration and rebinding. Ignore legacy host-supplied Init_TDINFO after validating its framing, reject lookup misses or SVN rollback, and fail closed when SERVTD_ATTR masking makes the endorsed unmasked hashes inapplicable.

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Retain authority-maintained hash history when adding a release, allow multiple hashes at one SVN, and reject conflicting duplicate assignments. Emit deterministic mapping bytes and validate signed mappings before use.

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
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