Address chunk size issue in wh_Client_SheSecureBoot#293
Draft
padelsbach wants to merge 1 commit intowolfSSL:mainfrom
Draft
Address chunk size issue in wh_Client_SheSecureBoot#293padelsbach wants to merge 1 commit intowolfSSL:mainfrom
padelsbach wants to merge 1 commit intowolfSSL:mainfrom
Conversation
2b1e6e9 to
9d9d6b6
Compare
9d9d6b6 to
6a06299
Compare
padelsbach
commented
Mar 2, 2026
| /* send what's left in the size available */ | ||
| updateReq->sz = ((bootloaderLen - bootloaderSent) % | ||
| (WOLFHSM_CFG_COMM_DATA_LEN - sizeof(*updateReq))); | ||
| remaining = bootloaderLen - bootloaderSent; |
Author
There was a problem hiding this comment.
This fixes the issue in the finding
padelsbach
commented
Mar 2, 2026
| REQ_SIZE = 32, | ||
| RESP_SIZE = 64, | ||
| BUFFER_SIZE = 4096, | ||
| BUFFER_SIZE = sizeof(whTransportMemCsr) + sizeof(whCommHeader) + |
Author
There was a problem hiding this comment.
BUFFER_SIZE was too small and causing a failure/hang due to overflow in build+test workflow in CI. This increases it to 5120.
padelsbach
commented
Mar 2, 2026
| WH_TEST_PRINT("SHE secure boot SUCCESS\n"); | ||
|
|
||
| /* verify bootloader at exact max update chunk boundary */ | ||
| bootloaderSz = maxBoundaryUpdateChunk; |
Author
There was a problem hiding this comment.
New test case to validate the finding fix
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
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.
Fixes finding 146 and adds associated regression test.
The added test case performs a second secure boot which triggered a failure in the server, even after the first one completed successfully. So there is a small change to allow a second
_SecureBootInit(). If this is not a valid use case, we may need a different solution for the test code.Also, this adjusts a buffer size constant in the test code.