Skip to content

Add size check in wh_Client_Curve25519SharedSecret#361

Merged
bigbrett merged 2 commits into
wolfSSL:mainfrom
padelsbach:curve25519-size-check
May 12, 2026
Merged

Add size check in wh_Client_Curve25519SharedSecret#361
bigbrett merged 2 commits into
wolfSSL:mainfrom
padelsbach:curve25519-size-check

Conversation

@padelsbach
Copy link
Copy Markdown
Contributor

Fixes F-3799

@padelsbach padelsbach force-pushed the curve25519-size-check branch from 9030316 to 721d935 Compare May 11, 2026 19:45
@padelsbach padelsbach marked this pull request as ready for review May 11, 2026 21:13
Copy link
Copy Markdown
Contributor

@bigbrett bigbrett left a comment

Choose a reason for hiding this comment

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

Hmm could we actually change this to mirror how we do it in ECDH and simply gating the memcpy on out_size != NULL? As written, when a caller passes an output buffer but no size pointer, the function still writes the server's data into that buffer without checking it fits. Would simplify the logic

@bigbrett bigbrett assigned padelsbach and unassigned wolfSSL-Bot May 11, 2026
@padelsbach padelsbach assigned bigbrett and unassigned padelsbach May 12, 2026
@bigbrett bigbrett merged commit d80da11 into wolfSSL:main May 12, 2026
106 checks passed
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