Update wolfHSM pointer, fix minor issues#729
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #729
Scan targets checked: wolfboot-bugs, wolfboot-src
Findings: 1
Low (1)
Crypto context devId changed from INVALID_DEVID to zero
File: hal/sim.c:173
Function: (file-scope initialization)
Category: HAL implementation flaws
The whServerCryptoContext crypto initialization was changed from explicitly setting .devId = INVALID_DEVID to zero-initialization ({0}). In wolfSSL, INVALID_DEVID is typically defined as -2, so devId will now be 0 instead of -2. A devId of 0 is a valid device identifier, which could cause the HSM server's crypto operations to be routed to an unintended crypto device rather than signaling "no device". This may be intentional if the updated wolfHSM submodule (also changed in this PR) now handles devId initialization internally, but if not, it could alter crypto operation routing in the simulator.
/* Before */
whServerCryptoContext crypto[1] = {{
.devId = INVALID_DEVID,
}};
/* After */
whServerCryptoContext crypto[1] = {0};Recommendation: Verify that the updated wolfHSM library (commit 18c46af) initializes devId to INVALID_DEVID internally during server setup, or that a devId of 0 is now the intended sentinel value. If neither is the case, restore the explicit .devId = INVALID_DEVID initialization to ensure crypto operations are not misrouted.
This review was generated automatically by Fenrir. Findings are non-blocking.
This field is no longer present in wolfHSM/wolfhsm/wh_server.h |
15f754f to
6f580e8
Compare
7e44671 to
11b4d49
Compare
11b4d49 to
e2f79c9
Compare
whServerCryptoContext.devIdinhal/sim.cSP_WORD_SIZEininclude/user_settings.h