fix(migtd-hash): reconstruct IGVM CFV pages by GPA - #1026
Open
haitaohuang wants to merge 1 commit into
Open
Conversation
The legacy extractor counted populated CFV pages, copied that many payload pages from the serialized IGVM stream, and appended zero padding. After IGVM payload ordering became sparse, this shifted or omitted enrolled policy files and produced offline RTMR values that did not match runtime memory. The issue was previously hidden because generated IGVMs happened to serialize populated CFV pages contiguously in GPA order. Place each PageData payload at its declared GPA, preserve gaps, and reject pages extending beyond the configuration volume. Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
haitaohuang
force-pushed
the
user/hhuang/fix-igvm-cfv-gpa-reconstruction
branch
from
September 2, 2026 19:58
6b4730c to
b46293e
Compare
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 legacy IGVM configuration-volume extractor counts populated CFV pages, copies that many payload pages from the serialized IGVM stream, and pads the remainder with zeroes. This assumes payloads are serialized contiguously in GPA order.
That assumption was previously hidden because generated IGVMs happened to use that layout. With sparse or reordered page payloads, enrolled policy and issuer-chain files can be shifted or omitted from the reconstructed CFV, causing offline RTMR1/RTMR2 and TDINFO measurements to differ from runtime memory.
Fix
Parse IGVM
PageDatadirectives and place each payload at its declared guest physical address relative to the CFV base. Preserve sparse gaps and reject pages that extend past the configuration-volume range.This fix is independent of the proposed one-hash TCB mapping work and applies directly to the existing
migtd-hashIGVM measurement path.Validation
cargo test -p migtd-hashcargo fmt -- --checkcargo check