Repository navigation
fix(sev-snp): accept version 5 attestation reports - #1704
Open
PierreLeGuen wants to merge 1 commit into
Open
PierreLeGuen wants to merge 1 commit into
PierreLeGuen wants to merge 1 commit into
Conversation
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>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
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.
Summary
SEV-SNP firmware 1.58 and later returns version 5 attestation reports, which populate
LAUNCH_MIT_VECTORandCURRENT_MIT_VECTORin bytes thatsev 6.0.0expects 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 readingHOST_DATA) and preventing KMS from verifying SEV-SNP guests.Changes
sevfrom6.0.0to6.3.0(dstack/Cargo.toml,dstack/Cargo.lock).3..=5insev-snp-qvl(dstack/sev-snp-qvl/src/lib.rs) with unit test coverage for v5 reports.version,sig_algo, andchip_idbeforeAttestationReport::write_bytesinmock-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_variablesandcargo fmt --all -- --check: pass.Split out from #1703.