Skip to content

Conversation

@LinuxJedi
Copy link
Member

The fixes are:

  • Validate agent signature responses
  • Bound agent signature copies
  • Clean SCP base path before filesystem access
  • Reject traversal filenames in SCP receive path

Tests have been added for the agent fixes.

Disallow '.' components and path separators in GetScpFileName so malicious SCP clients cannot escape the configured base directory.
Call wolfSSH_CleanPath on the client-supplied base path before ParseBasePathHelper so directory probing happens on canonicalised paths.
Treat *sigSz as the caller-provided capacity, raise WS_BUFFER_E if the agent response is larger, and clear the size on failure to avoid buffer overruns.
Track the last agent message id, reject non-signature replies, reset the failure flag, and ensure the agent write completes before trusting the returned signature.
Exercise agent write failures, non-signature responses, oversized signatures, and the happy path to cover the recent wolfSSH_AGENT_SignRequest hardening.
Instantiate a wolfSSH_AGENT_CTX before invoking wolfSSH_AGENT_SignRequest so the regression tests exercise the intended paths instead of failing with WS_AGENT_NULL_E.
@JacobBarthelmeh JacobBarthelmeh merged commit 2d2c1f5 into wolfSSL:master Oct 23, 2025
93 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