Skip to content

fix(sev-snp): accept version 5 attestation reports - #1704

Open
PierreLeGuen wants to merge 1 commit into
Dstack-TEE:nextfrom
nearai:fix/sev-snp-v5-reports
Open

PierreLeGuen wants to merge 1 commit into
Dstack-TEE:nextfrom
nearai:fix/sev-snp-v5-reports

Conversation

@PierreLeGuen

@PierreLeGuen PierreLeGuen commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

SEV-SNP firmware 1.58 and later returns version 5 attestation reports, which populate LAUNCH_MIT_VECTOR and CURRENT_MIT_VECTOR in bytes that sev 6.0.0 expects to be zeroed. On those hosts every report fails to parse ("Skipped bytes were expected to be zeroed"), preventing SEV-SNP guests from booting (when reading HOST_DATA) and preventing KMS from verifying SEV-SNP guests.

Changes

  • Bump sev from 6.0.0 to 6.3.0 (dstack/Cargo.toml, dstack/Cargo.lock).
  • Allow attestation report versions 3..=5 in sev-snp-qvl (dstack/sev-snp-qvl/src/lib.rs) with unit test coverage for v5 reports.
  • Populate version, sig_algo, and chip_id before AttestationReport::write_bytes in mock-attestation (dstack/crates/mock-attestation/src/sev_snp.rs).

Verification

  • cargo test --locked -p sev-snp-qvl -p mock-attestation -p dstack-attest -p dstack-kms: all test suites pass.
  • cargo clippy --locked -p sev-snp-qvl -p mock-attestation -- -D warnings --allow unused_variables and cargo fmt --all -- --check: pass.
  • End-to-end verified on AMD EPYC Turin (SEV-SNP API 1.58 build 10) guest boot and KMS attestation.

Split out from #1703.

SEV-SNP firmware 1.58 and later returns version 5 attestation reports, which
put LAUNCH_MIT_VECTOR and CURRENT_MIT_VECTOR in bytes that sev 6.0.0 parses
as reserved and requires to be zero. On such hosts every report fails to
parse ("Skipped bytes were expected to be zeroed"), so an SNP guest stops at
boot when it reads its HOST_DATA, and the KMS cannot verify SNP guests.

Bump sev to 6.3.0, which parses and re-serializes version 5 reports, and let
sev-snp-qvl verify versions 3 to 5: it rejected anything newer than 3, and
the fields it reads are laid out the same in version 5.

Signed-off-by: Pierre LE GUEN <26087574+PierreLeGuen@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T13:26:36.747787Z 804c4ea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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