Repository navigation
echoserver: wipe and bound the key load buffer - #1340
Open
ejohnstown wants to merge 2 commits into
Open
ejohnstown wants to merge 2 commits into
ejohnstown wants to merge 2 commits into
Conversation
keyLoadBuf held host private keys but was wiped only under WOLFSSH_SMALL_STACK. KeyLoadBufFree() now wipes it in every build and frees it only when it came from the heap. - Route every keyLoadBuf exit through KeyLoadBufFree() - Wipe the ML-DSA key buffer in LoadMlDsaHostKeys() before each free Issue: F-8859, F-10605
LoadPublicKeyBuffer() searches for its delimiters only up to the end of the buffer, so a -j file without a final newline is rejected instead of read past. The sample password, public key, and none lists are copied into keyLoadBuf only when they fit. - Add FindDelimiter() in place of the unbounded WSTRCHR() calls - Add CopyToKeyLoadBuf(), which refuses a string with no room for its terminator and still accepts an empty one - Warn when a -j file's keys are not all loaded - Fix the comment claiming every sample key is ssh-rsa Issue: F-10600, F-10565, F-14765
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1340
Scan targets checked: wolfssh-src, wolfssh-bugs
Coverage: 1 of 1 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
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.
The echoserver's key load buffer held host private keys but was wiped
only in small-stack builds, and the key list parse could read past it.
buffer is wiped before each free.
Issue: F-8859, F-10605, F-10600, F-10565, F-14765