Skip to content

Download/Verify Firmware from GCP and Derive HOB from Firmware#13

Merged
alexhulbert merged 3 commits into
mainfrom
ah/gcp-hobgen
Jul 2, 2026
Merged

Download/Verify Firmware from GCP and Derive HOB from Firmware#13
alexhulbert merged 3 commits into
mainfrom
ah/gcp-hobgen

Conversation

@alexhulbert

Copy link
Copy Markdown
Collaborator

This is in preparation for the GCP endorsement verification PR. This allows me to fully remove td_hob_template.bin in that PR. It future proofs us in case GCP makes significant enough changes to their OVMF fork that it alters the accepted memory layout.

@ameba23 ameba23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ Great to have HOB digest built for GCP.

I don't see any red flags, and i see that build_hob_template_from_blobis not yet actually used in the GCP verifier path. But still i would not approve this without tests covering build_hob_template_from_blob.

Comment thread crates/measure/src/dcap/firmware.rs
@alexhulbert

Copy link
Copy Markdown
Collaborator Author

Yeah makes sense. I have some tests for build_hob_template_from_blob in my GCP endorsement branch. I'll just group those changes into this PR

@alexhulbert alexhulbert changed the title Derive GCP HOB from Firmware Derive GCP HOB from Firmware and Download/Verify Firmware from GCP Jun 16, 2026
@alexhulbert alexhulbert changed the title Derive GCP HOB from Firmware and Download/Verify Firmware from GCP Download/Verify Firmware from GCP and Derive HOB from Firmware Jun 16, 2026
@alexhulbert

Copy link
Copy Markdown
Collaborator Author

@ameba23 Added another commit to this PR that implements firmware::from_google(mrtd) since it was only ~300 lines of code. I also added a test that checks the whole pipeline so if something breaks build_hob_template_from_blob, the test will fail. i plan on adding more checks around these functions in my upcoming image integration test repo

@alexhulbert
alexhulbert changed the base branch from ah/better-interface to main June 16, 2026 03:05

@ameba23 ameba23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪩 Great work.

Approving as this does all work, but i think theres still some work needed to be able to test against stored assets. Happy to have this merged as is and changes done in followups.

Ive updated flashbots/attested-tls#47 to use this branch, and currently adding a cache for known GCP MRTDs.

for (gib, expected) in cases {
assert_eq!(firmware.hob.digest(gib * GIB).unwrap(), expected, "ram={gib} GiB");
for (mrtd, cfv) in releases {
let firmware = DcapFirmware::from_google(mrtd).unwrap();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to actually fetch the firmware in tests? I think this test is not guaranteed to continue to work in the future.

Maybe we want to test a pre-fetched observed response from the endorsement bucket against these April 2026 MRTDs / CFVs / HOB values.

Comment thread crates/verify/src/lib.rs
Comment thread crates/measure/src/dcap/firmware.rs
Comment thread crates/measure/src/dcap/firmware.rs
Comment thread crates/measure/src/dcap/firmware.rs
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.

2 participants