Skip to content

Add data len check in wh_CommClient_RecvResponse#388

Open
padelsbach wants to merge 1 commit into
wolfSSL:mainfrom
padelsbach:comm-client-recv-len-check
Open

Add data len check in wh_CommClient_RecvResponse#388
padelsbach wants to merge 1 commit into
wolfSSL:mainfrom
padelsbach:comm-client-recv-len-check

Conversation

@padelsbach
Copy link
Copy Markdown
Contributor

wh_CommClient_RecvResponse does a memcpy into a caller provided buf without checking the length -- the function does not contain a length param, however the calling functions do.

This change adds the data_size param, so this change does break the API. Alternative was to use existing uint16_t* out_size as an inout param, but that felt too sneaky and easy to overlook.

All 130ish callers updated. src-jp references the params (and is updated), but the English src does not.

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #388

Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread src/wh_comm.c
@padelsbach padelsbach marked this pull request as ready for review May 29, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants