Skip to content

Fix minor issues#966

Merged
ejohnstown merged 1 commit intowolfSSL:masterfrom
yosuke-wolfssl:f_fix
May 8, 2026
Merged

Fix minor issues#966
ejohnstown merged 1 commit intowolfSSL:masterfrom
yosuke-wolfssl:f_fix

Conversation

@yosuke-wolfssl
Copy link
Copy Markdown
Contributor

@yosuke-wolfssl yosuke-wolfssl commented May 8, 2026

This PR fixes the following minor issues:

  • In DoUserAuthInfoRequest(), Fix the accesses to ssh->ctx->heap and ssh->authId inside NULL check
  • In wolfSSH_ReadKey_file(), Fix wrong argument of WFCLOSE()
  • In FingerprintKey(), Fix Trailing Padding Check
  • Fix AlgoListSz() for empty string input
  • Fix the processing order in BundlePacket() for bounds Check

Addressed by f_215, f_216, f_406, f_407, f_408

@yosuke-wolfssl yosuke-wolfssl self-assigned this May 8, 2026
Copilot AI review requested due to automatic review settings May 8, 2026 07:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses several small correctness issues in wolfSSH’s core packet/auth handling and client tooling by tightening bounds checks, fixing an invalid filesystem-close call, and preventing invalid memory accesses.

Changes:

  • Fix file closing in wolfSSH_ReadKey_file() by passing the correct filesystem context to WFCLOSE().
  • Harden parsing/auth flow: handle empty algorithm-list strings safely and avoid dereferencing ssh->ctx / setting authId on failure in keyboard-interactive auth.
  • Correct ordering and bounds checks in packet bundling and fix a trailing Base64 padding check in fingerprint formatting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/ssh.c Fixes WFCLOSE() call in wolfSSH_ReadKey_file() to use the correct filesystem argument.
src/internal.c Adds safe empty-string handling in AlgoListSz(), corrects keyboard-interactive auth heap/authId handling, and reorders MAC buffer zeroing after bounds checks in BundlePacket().
apps/wolfssh/common.c Fixes trailing Base64 padding removal logic in FingerprintKey() without out-of-bounds access.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ejohnstown ejohnstown merged commit dc914af into wolfSSL:master May 8, 2026
135 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.

4 participants