Secureboot: Production secureboot signing enhancements (ephemeral keys and bugfixes)#23405
Secureboot: Production secureboot signing enhancements (ephemeral keys and bugfixes)#23405lguohan merged 2 commits intosonic-net:masterfrom
Conversation
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@bhouse-nexthop Specifically I want to ask about this change: Currently we are able to pass more than one argument, this is just done by adding the apostrophes in the argument assignment. If we have this change, this would not work any more. So while I understand your change, this will break it, and if we will decide to take it - we should cherry-pick it to older branches as well. |
|
@DavidZagury sure, I will work on splitting this up into 2 or more PRs. We also have uncovered some other bugs that we were planning to upstream as well. I think the quoting 'hack' example you gave isn't proper, but I do understand it would technically break the existing integration you have that is aware of the bug and works around it. |
6210e2a to
a363e6e
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@DavidZagury PRs broken out smaller now |
a363e6e to
09d9ddb
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
09d9ddb to
50945c7
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
50945c7 to
24db23f
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@Yarden-Z any comments? |
|
This pull request introduces a new Makefile/config variable: SECURE_UPGRADE_KERNEL_CAFILE, which represents the path to a PEM file containing trusted certificates to be embedded into the kernel during a secure upgrade. Here’s a summary and review of the changes: Summary of Changes1. Adds
2. Documentation Updates:
3. Propagation in Build System:
ReviewPositives
Suggestions / Questions
Minor
ConclusionThis PR is well-structured and improves the flexibility of the secure upgrade process. The code changes are straightforward, maintain compatibility, and are clearly documented. Let me know if you want a deeper review of the downstream usage or have concerns about specific build flows! |
|
@bhouse-nexthop , can you help to resolve the conflict? I am now using AI to provide assist to the PR review and ultimately speed up the review process. |
|
on it, will have this in a few minutes |
|
also let me know if those review comments are good or not. |
24db23f to
b889a34
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@lguohan thanks so much for merging all these! Nice meeting you at OCP as well. I've rebased and fixed the merge conflict. |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The AI review is pretty good. It caught a typo of "to to" that I just fixed. Regarding the "questions", it makes valid points and that was indeed handled by sonic-net/sonic-linux-kernel#499 which you already merged. Thank you! |
|
/azpw run Azure.sonic-buildimage |
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
f114125 to
443fb5b
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
rebased to force a rebuild. The test failures were spurious in a completely unrelated realm. |
Probably needs a rebuild again? |
443fb5b to
41eeb59
Compare
|
/azp run Azure.sonic-buildimage |
ugh .... |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Second time it worked :-) |
|
@lguohan this is the last of the secureboot patches, looks like the rebuild succeeded this time. Any chance this can be merged? |
|
@bradh352 , i would really appreciated that commit itself has good description as you have on the pr message, in this case I do not need modify commit message during the merge. it would be great if you can ask all nexthop folks to have good PR description every thing when you push changes. it will definitely speed up the merge process. |
…s and bugfixes) (sonic-net#23405) #### Why I did it The current sonic secureboot implementation assumes all assets are signed with the DB Key. There are roughly 3600 kernel modules that get signed in the process. Organizations may have varying security policy requirements where any signing requests may require signoff by one or more parties, this may simply be infeasible for that many requests. Given that the DB key may be a long-lived key, and only RSA 2048 is often used or available, it is a security best-practice to sign as few assets as possible with such a key. This PR is fully backwards compatible with any pre-existing usages. It introduces a new `rules/config` setting of `SECURE_UPGRADE_KERNEL_CAFILE` which is a path to a file for all trusted keys to embed into the kernel. If that setting is not specified, it defaults to `SECURE_UPGRADE_SIGNING_CERT`. There are no other infrastructure changes to support ephemeral keys for kernel module signing. It is up to the organization to generate the ephemeral keys and pass them into their own signing scripts as required. Dependent PR: * sonic-net/sonic-linux-kernel#499 Related PRs: * sonic-net/sonic-utilities#3989 * sonic-net#23732 * sonic-net#23733 * sonic-net#23734 * sonic-net#23735 * sonic-net#23736 Fixes sonic-net#23406 ##### Work item tracking #### How I did it Worked through production signing steps and hit issues when requiring signing approval with our HSM. This was the most elegant solution that required the minimal changes. This has been fully tested. #### How to verify it Since there are no provided production signing script examples this would require a vendor with an existing implementation to validate. Nexthop has validated this internally. #### Which release branch to backport (provide reason below if selected) #### Tested branch (Please provide the tested image version) master as of 20250721 #### Description for the changelog Secureboot: Production signing enhancement to allow ephemeral kernel module keys #### Link to config_db schema for YANG module changes N/A #### A picture of a cute animal (not mandatory but encouraged) Signed-off-by: Brad House <bhouse@nexthop.ai> Signed-off-by: Feng Pan <fenpan@microsoft.com>
…s and bugfixes) (sonic-net#23405) #### Why I did it The current sonic secureboot implementation assumes all assets are signed with the DB Key. There are roughly 3600 kernel modules that get signed in the process. Organizations may have varying security policy requirements where any signing requests may require signoff by one or more parties, this may simply be infeasible for that many requests. Given that the DB key may be a long-lived key, and only RSA 2048 is often used or available, it is a security best-practice to sign as few assets as possible with such a key. This PR is fully backwards compatible with any pre-existing usages. It introduces a new `rules/config` setting of `SECURE_UPGRADE_KERNEL_CAFILE` which is a path to a file for all trusted keys to embed into the kernel. If that setting is not specified, it defaults to `SECURE_UPGRADE_SIGNING_CERT`. There are no other infrastructure changes to support ephemeral keys for kernel module signing. It is up to the organization to generate the ephemeral keys and pass them into their own signing scripts as required. Dependent PR: * sonic-net/sonic-linux-kernel#499 Related PRs: * sonic-net/sonic-utilities#3989 * sonic-net#23732 * sonic-net#23733 * sonic-net#23734 * sonic-net#23735 * sonic-net#23736 Fixes sonic-net#23406 ##### Work item tracking #### How I did it Worked through production signing steps and hit issues when requiring signing approval with our HSM. This was the most elegant solution that required the minimal changes. This has been fully tested. #### How to verify it Since there are no provided production signing script examples this would require a vendor with an existing implementation to validate. Nexthop has validated this internally. #### Which release branch to backport (provide reason below if selected) #### Tested branch (Please provide the tested image version) master as of 20250721 #### Description for the changelog Secureboot: Production signing enhancement to allow ephemeral kernel module keys #### Link to config_db schema for YANG module changes N/A #### A picture of a cute animal (not mandatory but encouraged) Signed-off-by: Brad House <bhouse@nexthop.ai> Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
Why I did it
The current sonic secureboot implementation assumes all assets are signed with the DB Key. There are roughly 3600 kernel modules that get signed in the process.
Organizations may have varying security policy requirements where any signing requests may require signoff by one or more parties, this may simply be infeasible for that many requests.
Given that the DB key may be a long-lived key, and only RSA 2048 is often used or available, it is a security best-practice to sign as few assets as possible with such a key.
This PR is fully backwards compatible with any pre-existing usages. It introduces a new
rules/configsetting ofSECURE_UPGRADE_KERNEL_CAFILEwhich is a path to a file for all trusted keys to embed into the kernel. If that setting is not specified, it defaults toSECURE_UPGRADE_SIGNING_CERT. There are no other infrastructure changes to support ephemeral keys for kernel module signing. It is up to the organization to generate the ephemeral keys and pass them into their own signing scripts as required.Dependent PR:
Related PRs:
Fixes #23406
Work item tracking
How I did it
Worked through production signing steps and hit issues when requiring signing approval with our HSM. This was the most elegant solution that required the minimal changes.
This has been fully tested.
How to verify it
Since there are no provided production signing script examples this would require a vendor with an existing implementation to validate. Nexthop has validated this internally.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
master as of 20250721
Description for the changelog
Secureboot: Production signing enhancement to allow ephemeral kernel module keys
Link to config_db schema for YANG module changes
N/A
A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Brad House bhouse@nexthop.ai