Skip to content

Check the endorsed tcb and chip id match those in the attestation.#7240

Merged
cjen1-msft merged 23 commits intomicrosoft:mainfrom
cjen1-msft:fixup-endorsed-tcb-verification
Sep 12, 2025
Merged

Check the endorsed tcb and chip id match those in the attestation.#7240
cjen1-msft merged 23 commits intomicrosoft:mainfrom
cjen1-msft:fixup-endorsed-tcb-verification

Conversation

@cjen1-msft
Copy link
Copy Markdown
Contributor

@cjen1-msft cjen1-msft commented Sep 2, 2025

This PR adds checks in verify_snp_attestation_report to check the tcb version in the retrieved endorsements against those in the attestation, and additionally validates the chip_id in the endorsements.

If the relevant oids in the certificate are not set, then the check is ignored as the certificate must still have the correct root signature, and hence their omission can only be intentional.
Otherwise if the check fails, it will throw an exception.

Update:
Also refactored the attestation logic to live in a private .cpp file to clean up the public API surface.

@cjen1-msft cjen1-msft requested a review from a team as a code owner September 2, 2025 16:01
Comment thread include/ccf/pal/attestation.h Outdated
Comment thread include/ccf/pal/attestation.h Outdated
@cjen1-msft cjen1-msft added the run-long-test Run Long Test job label Sep 2, 2025
Comment thread include/ccf/pal/attestation.h Outdated
Comment thread include/ccf/pal/attestation.h Outdated
Comment thread include/ccf/pal/attestation.h Outdated
Comment thread include/ccf/pal/attestation_sev_snp.h Outdated
Comment thread include/ccf/pal/attestation_sev_snp.h
Comment thread src/pal/attestation.cpp Outdated
Comment thread src/pal/attestation.cpp Outdated
Comment thread src/pal/attestation.cpp
Comment thread src/pal/attestation.cpp Outdated
cjen1-msft and others added 3 commits September 4, 2025 14:46
Co-authored-by: Amaury Chamayou <amaury@xargs.fr>
Co-authored-by: Amaury Chamayou <amaury@xargs.fr>
@achamayou achamayou added auto-backport Automatically backport this PR to LTS branch 6.x-todo PRs which should be backported to 6.x labels Sep 11, 2025
@cjen1-msft cjen1-msft added this pull request to the merge queue Sep 12, 2025
Merged via the queue into microsoft:main with commit d1b1b18 Sep 12, 2025
44 of 45 checks passed
@cjen1-msft cjen1-msft deleted the fixup-endorsed-tcb-verification branch September 12, 2025 09:30
cjen1-msft added a commit to cjen1-msft/CCF that referenced this pull request Sep 12, 2025
…icrosoft#7240)

Co-authored-by: Amaury Chamayou <amchamay@microsoft.com>
Co-authored-by: Amaury Chamayou <amaury@xargs.fr>
cjen1-msft added a commit that referenced this pull request Sep 15, 2025
Co-authored-by: Amaury Chamayou <amchamay@microsoft.com>
Co-authored-by: Amaury Chamayou <amaury@xargs.fr>
Co-authored-by: Eddy Ashton <ashton.eddy@gmail.com>
@cjen1-msft cjen1-msft added the backported This PR was successfully backported to LTS branch label Sep 15, 2025
eddyashton pushed a commit to eddyashton/CCF that referenced this pull request Oct 10, 2025
…icrosoft#7240)

Co-authored-by: Amaury Chamayou <amchamay@microsoft.com>
Co-authored-by: Amaury Chamayou <amaury@xargs.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.x-todo PRs which should be backported to 6.x auto-backport Automatically backport this PR to LTS branch backported This PR was successfully backported to LTS branch run-long-test Run Long Test job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants