Repository navigation
fix(sevsnp): verify the certificate chain up to AMD's roots; the host's table need not carry the ASK and ARK - #490
nikolaichuk7 wants to merge 1 commit into
Conversation
setrofim
left a comment
There was a problem hiding this comment.
As with the other pull, please move all tests for scheme.go into scheme_test.go.
af0eb40 to
d73ae83
Compare
|
I need some more time to review this. There are two things I'm trying to figure out:
My suggestion is to keep the verifier code as is. The verifier could expect the auxblob to contain all three certificates. A layer in front of the verifier (perhaps RATSd presently) could sanitize this and supply the certificate chain for validation. We have been thinking about a caching service, and I believe that's a good place to have this logic - we could download missing certificates there and also handle certificate revocation over there. But I'm open to discussion. @yogeshbdeshpande @thomas-fossati @setrofim |
|
Thanks, both points deserve a careful answer, and checking them corrected one thing I had assumed. On the table: the kernel ABI says On the intermediates: today the intermediate is whatever the table carries; it is checked structurally and by signature up to the table's ARK, and that ARK must equal the provisioned trust anchor. This change takes the intermediate from AMD's published chains instead, the same ones the KDS serves and go-sev-guest embeds, and still requires the ARK that certifies it to equal the provisioned trust anchor; the Attester no longer has to ship it. Revocation is checked in neither case ( On the layer in front: a caching service that supplies and refreshes AMD's chains is a good home for this, and |
|
Thanks @nikolaichuk7! Would you be able to attend the Veraison weekly-sync tomorrow to discuss this? What's your time zone? The meeting is at 11 am US ET. https://armltd.zoom.us/j/93024860563?pwd=dVpVcFRtSVFmV29HV3dHWENrZk5WQT09 Since this is a one-off vendor adjustment, would it be OK to have a separate config file for AWS which turns on Certificate Fetching ( |
|
Thanks, Jag. Rather than argue it, I measured it: one test, dropped into five checkouts of this repository and run on the pinned go-sev-guest and on v0.15.0, against upstream's own sample and the two real reports in this PR's fixtures (AWS Milan VLEK of 6 October, Google Cloud Milan VCEK of 7 October), each with the table as the host supplies it and with variations. Each cell is
Three things the table says:
So I would keep the roots with the scheme, embedded by default and loadable from a bundle a caching service refreshes (I can add that option here), rather than a per-vendor configuration with fetching on. Why each ❌ (the scheme's error, then the integrity check's)
The test, the loop, the two reports and the raw rows are on the branch On the sync: thanks for the invitation. I'm travelling this week and can't make tomorrow; next Tuesday works for me, and 11 am ET suits. Until then I'm glad to continue here. |
d73ae83 to
749e9cc
Compare
…n#490 by tag; veraison#490 was rebased on main after veraison#488 merged Signed-off-by: Serhii Nikolaichuk <nikolaichuk.s.f@gmail.com>
…'s table need not carry the ASK and ARK
AWS hosts put the VLEK alone in the SEV-SNP certificate table, and the
scheme required the table to carry the ASK and the ARK: a VLEK report
from an AWS guest failed at GetTrustAnchorIDs ("can't read ARK to compose
TA ID") and at ValidateEvidenceIntegrity ("missing ARK certificate in
evidence") unless the guest appended AMD's chain itself. go-sev-guest's
embedded defaults hold no ASVK, so a VLEK chain could not be built from
them either.
The scheme now holds AMD's roots itself: the six chains AMD's KDS
publishes and go-sev-guest embeds (ASK and ARK for a VCEK, ASVK and ARK
for a VLEK; Milan, Genoa, Turin), passed to go-sev-guest as TrustedRoots.
The trust anchor to look up, and the one compared with the provisioned
trust anchor, is the ARK among those roots that certifies the
intermediate that signed the report's certificate; the table's ASK, ASVK
and ARK entries, if any, play no part, and the table need only carry the
report's signing key. The Turin VLEK chain is trimmed of its trailing
blank line, which kds.ParseProductCertChain refuses
(google/go-sev-guest#206).
Tests, in scheme_test.go: the six roots parse into the expected
subjects; a real VLEK report from an AWS EC2 c6a.large guest (6 October
2026), with the table as the host supplies it, yields the ARK-Milan
trust-anchor ID and validates, as does the same report with AMD's chain
appended; another nonce, a changed MEASUREMENT and another product line's
ARK are refused. Without this change the host's table fails both lookups
above.
Signed-off-by: Serhii Nikolaichuk <nikolaichuk.s.f@gmail.com>
749e9cc to
55301be
Compare
Description
Rebased on main after #488 was merged (1f2c320); one commit.
AWS hosts put the VLEK alone in the SEV-SNP certificate table, and the scheme required the table to carry the ASK and the ARK: a
VLEK report from an AWS guest failed at
GetTrustAnchorIDs("can't read ARK to compose TA ID") and atValidateEvidenceIntegrity("missing ARK certificate in evidence") unless the guest appended AMD's chain itself. go-sev-guest's embedded defaults hold no ASVK,
so a VLEK chain could not be built from them either.
The scheme now holds AMD's roots itself: the six chains AMD's KDS publishes and go-sev-guest embeds (ASK and ARK for a VCEK, ASVK
and ARK for a VLEK; Milan, Genoa, Turin), passed to go-sev-guest as
TrustedRoots. The trust anchor to look up, and the onecompared with the provisioned trust anchor, is the ARK among those roots that certifies the intermediate that signed the report's
certificate; the table's ASK, ASVK and ARK entries, if any, play no part, and the table need only carry the report's signing key.
The Turin VLEK chain is trimmed of its trailing blank line, which
kds.ParseProductCertChainrefuses (google/go-sev-guest#206).Tests, in
scheme_test.go: the six roots parse into the expected subjects; a real VLEK report from an AWS EC2 c6a.large guest(6 October 2026;
test/evidence/sevsnp-aws-vlek-tsm-report.cbor, provenance intest/evidence/SOURCES.md), with the table as thehost supplies it, yields the ARK-Milan trust-anchor ID and validates, as does the same report with AMD's chain appended; another
nonce, a changed MEASUREMENT and another product line's ARK are refused. Without this change the host's table fails both lookups.
Fixes #489.
Checklist
test/evidence/SOURCES.md)