-
Notifications
You must be signed in to change notification settings - Fork 731
Secureboot: Image signing verification enhancements #3989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bhouse-nexthop
wants to merge
2
commits into
sonic-net:master
Choose a base branch
from
bhouse-nexthop:secureboot
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@ycoheNvidia since you contributed the signing validation for sonic images, can you review this PR modification? |
Adding @davidpil2002 @DavidZagury @Yarden-Z as well |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
The DB Key is not guaranteed to be a CARoot. It is possible to have the DB Key be an intermediate as it is trusted via the EFI signing methods which do not use the normal PKI methodology. This adds a secondary signing verification, the original plus the above described method. Signed-off-by: Brad House <[email protected]>
Signed-off-by: Travis Brown <[email protected]>
7abbfab
to
2187307
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@qiluo-msft - could you please help with the review? |
ycoheNvidia
approved these changes
Aug 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me
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.
What I did
The current signature verification of sonic images assumes the DB Keys are all Root CAs. The secureboot standard says nothing about this, the DBKeys are explicitly trusted by signing them with the KEK, and that signing method does not follow the standard X.509 PKI architecture. Therefore the DB Key is not guaranteed to be a CA Root (aka not self-signed). It is possible the DB Key was created as an intermediate, but since it is explicitly trusted that is ok.
Fixes sonic-net/sonic-buildimage#23406
How I did it
This adds this explicit trust of the DB Key as a secondary signing verification if the original verification fails. It disables looking inside the pkcs7 container for any keys at all and assumes the key specified is the exact key for the signature.
How to verify it
Build secureboot image signed with a DB Key that is not self-signed, then run through the sonic-installer install with that image and see the verification succeeds.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)