Repository navigation
feat(sev-snp-qvl): reject ASKs revoked by AMD's CRL - #1622
Merged
Merged
Conversation
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
feat/snp-crl-check
branch
from
November 19, 2026 04:54
b2cb503 to
e94ac5d
Compare
kvinwang
enabled auto-merge
November 19, 2026 04:54
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
sev-snp-qvlnever consults AMD's CRL. AMD publishes one CRL per product family at<kds>/<product>/crl, signed by the ARK, to revoke ASKs. A revoked ASK still verified on both paths: when the evidence supplies the certificates, and when they are fetched from KDS.Fix
QuoteVerifier::fetch_and_verifynow checks the ASK against its product's CRL on both paths. The check happens after the report verifies, against the product whose ARK verified it. The CRL must:thisUpdate <= now < nextUpdate;AmdKdsClientcaches each CRL for an hour. AMD reissues them about every six weeks. A failed CRL fetch surfaces asCollateralUnavailable, i.e. retryable, like any other KDS fetch. The offlineQuoteVerifier::verifyandverify_amd_snp_*free functions are unchanged, and their doc says they don't check the CRL.The mock KDS serves a CRL signed by its ARK, so simulator and mock flows keep working.
Behavior change
Verifying evidence that carries its own certificates now needs KDS, or the configured
amd_kdsmirror, to serve the CRL. A mirror that serves onlycert_chainand VCEKs must add/<product>/crl.Verification
testdata/amd-milan.crl) verifies against the built-in Milan ARK and ASK. It is rejected afternextUpdate, under the Genoa ARK (wrong issuer), and with a flipped signature byte.fetch_and_verifythrough both the supplied and the fetched path against the mock CRL.dstack-attest/testspassesfetch_and_verifyagainstkdsintf.amd.comon both paths.cargo test -p sev-snp-qvl -p mock-attestation -p dstack-tee-simulator -p dstack-attest -p dstack-verifier -p dstack-kms -p dstack-gateway --all-featurespasses; clippy is clean with the CI flags.