Skip to content

attestation: verify SNP SVSM vTPM evidence - #212

Merged
jialez0 merged 3 commits into
openanolis:mainfrom
jialez0:agent/snp-vtpm-runtime-attestation
Aug 5, 2026
Merged

jialez0 merged 3 commits into
openanolis:mainfrom
jialez0:agent/snp-vtpm-runtime-attestation

Conversation

@jialez0

@jialez0 jialez0 commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • verify the SVSM VMPL0 report binding as REPORT_DATA = SHA-512(nonce || service manifest)
  • enforce SNP/SVSM vTPM composite bindings once in the Attestation Service core, so KBS, RESTful AS, and gRPC AS share the same behavior
  • require the top-level TPM evidence to exactly match the TPM evidence covered by the SNP runtime data, and require both requests to use the same base runtime data
  • bind the TPM EK to the vTPM service manifest and reject host-injected TPM or cross-guest evidence splicing
  • verify TPM quote signatures, nonces, PCR digests, and replay the firmware event log followed by the AA runtime event log
  • keep standalone SNP/TPM evidence compatible and keep Keylime AK/EK validation optional unless keylime_agent_uuid is present
  • expose verified PCR and SVSM claims for policy evaluation

Companion attester change: inclavare-containers/guest-components#103

Validation

Local:

  • cargo test -p attestation-service -p verifier: AS 31 passed; REST 5 passed; RVPS E2E 2 passed; verifier 57 passed, 3 ignored
  • cargo test -p kbs: 47 passed
  • composite-binding suite: 7 passed, including a regression for plain SNP with empty additional evidence
  • cargo clippy -p attestation-service -p verifier -- -D warnings -A clippy::derive_partial_eq_without_eq: passed
  • cargo clippy -p kbs -- -D warnings: passed

Real AMD EPYC Turin SEV-SNP E2E with Coconut SVSM and Fedora 44 (6.19.10-300.fc44.x86_64):

  • guest ran at VMPL2 and exposed /dev/sev-guest, /dev/tpm0, /dev/tpmrm0, sev_guest, tsm_report, and tpm_svsm
  • an AA runtime event extended PCR10 from zero to 02f713ae04900eeb2a9b569538fe8cf5536d25934979cf01316e81676dac0d35
  • KBS accepted the signed SNP + TPM composite evidence and logged both verifier passes
  • direct RESTful AS and gRPC AS accepted the same real evidence with a fresh signed AS challenge; both tokens contained the AAEL event and updated PCR10
  • changing the SVSM manifest, replacing the top-level TPM evidence, or changing the TPM base runtime data was rejected before token issuance; REST returned stable binding/invalid-request errors and gRPC returned Aborted
  • Keylime was intentionally left unset, validating the complete non-Keylime core path

Real plain SEV-SNP compatibility E2E on the same Turin host, without SVSM or TPM:

  • current guest-components PR Resource Policy: Fix file_system to file-system #103 head emitted a version-5 VMPL0 SNP report with no svsm_manifest or additional TPM evidence
  • KBS built from this PR head accepted the evidence and issued a 1702-byte EAR token
  • annotated evidence contained only snp claims (measurement, policy, platform and Turin TCB); no svsm_attestation or TPM claim was added
  • the EAR policy status remained contraindicated because the test policy had no allowlisted measurement/TCB values; token issuance and annotated SNP claims confirm cryptographic verification succeeded

The stock Alibaba Cloud Linux 4.0.4 guest was evaluated first. With the recent OVMF required by Coconut, its boot path page-faulted in \EFI\BOOT\fbx64.efi before entering Linux, so Fedora 44 was used for the complete guest validation.

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@jialez0
jialez0 marked this pull request as ready for review August 3, 2026 12:08
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@jialez0
jialez0 merged commit 57aadd7 into openanolis:main Aug 5, 2026
11 checks passed
@jialez0
jialez0 deleted the agent/snp-vtpm-runtime-attestation branch August 11, 2026 08:33
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