Skip to content

feat(sev-snp-qvl): reject ASKs revoked by AMD's CRL - #1622

Merged
kvinwang merged 2 commits into
nextfrom
feat/snp-crl-check
Nov 19, 2026
Merged

kvinwang merged 2 commits into
nextfrom
feat/snp-crl-check

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Problem

sev-snp-qvl never 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_verify now 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:

  • be issued by the pinned ARK, never one taken from the evidence or from KDS;
  • carry a valid signature (RSA-PSS-SHA384 for AMD's ARKs, ECDSA-P384 for test roots), reusing the existing certificate signature check;
  • be current: thisUpdate <= now < nextUpdate;
  • not list the ASK's serial.

AmdKdsClient caches each CRL for an hour. AMD reissues them about every six weeks. A failed CRL fetch surfaces as CollateralUnavailable, i.e. retryable, like any other KDS fetch. The offline QuoteVerifier::verify and verify_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_kds mirror, to serve the CRL. A mirror that serves only cert_chain and VCEKs must add /<product>/crl.

Verification

  • Real AMD data: AMD's current Milan CRL (testdata/amd-milan.crl) verifies against the built-in Milan ARK and ASK. It is rejected after nextUpdate, under the Genoa ARK (wrong issuer), and with a flipped signature byte.
  • Revocation: an rcgen-built ARK/ASK pair with a CRL that lists the ASK's serial is rejected; the same pair with an empty CRL passes.
  • The mock-attestation server test now runs fetch_and_verify through both the supplied and the fetched path against the mock CRL.
  • One-off live run, not committed: the real Milan fixture from dstack-attest/tests passes fetch_and_verify against kdsintf.amd.com on 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-features passes; clippy is clean with the CI flags.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang enabled auto-merge November 19, 2026 04:54
@kvinwang
kvinwang merged commit 6039709 into next Nov 19, 2026
23 checks passed
@kvinwang
kvinwang deleted the feat/snp-crl-check branch November 19, 2026 05:01
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