Repository navigation
ossh: OpenSSH private-key parser fixes - #1351
Open
ejohnstown wants to merge 2 commits into
Open
ejohnstown wants to merge 2 commits into
ejohnstown wants to merge 2 commits into
Conversation
GetOpenSshKey checked the padding only when the private section was a whole number of blocks, so a misaligned section, or one ending in junk, loaded. It now rejects a section that is not a multiple of MIN_BLOCK_SZ, as OpenSSH does, and compares every pad byte before deciding. - tests: parse crafted Ed25519 keys with good, missing, junk and bad padding Issue: F-12551, F-13925
GetOpenSshKeyEd25519 now returns its parse errors as they are and reports a wolfCrypt failure as WS_ED25519_E instead of WS_ECC_E. The OpenSSH key decoders take the WS_KeySignature heap and initialize the key with it, where they used NULL or the zeroed key's own heap field. - tests: check the Ed25519 decoder errors and the heap of a decoded key Issue: F-11653, F-11656
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1351
Scan targets checked: wolfssh-src, wolfssh-bugs
Coverage: 1 of 2 in-scope changed file(s) opened by the reviewer; not opened: tests/unit.c
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 OpenSSH private-key parser now requires block-aligned padding, and
its key decoders keep the real error and the caller's heap.
and every pad byte is checked
instead of WS_ECC_E
heap
This and #1352 both add a test at the same spot in tests/unit.c;
whichever merges second will be rebased onto the other.
Issue: F-12551, F-13925, F-11653, F-11656