Skip to content

echoserver: check the id before the legacy claim - #1274

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
ejohnstown:sf27
Sep 23, 2026
Merged

philljj merged 1 commit into
wolfSSL:masterfrom
ejohnstown:sf27

Conversation

@ejohnstown

@ejohnstown ejohnstown commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Addresses Coverity CID 656285: ssh_worker()'s legacy claim ignored the return value of wolfSSH_ChannelGetId(). The claim now requires WS_SUCCESS before marking the session connected.

  • Tested with make check on clang and gcc-16 (--enable-all), and with an OpenSSH non-sftp subsystem request, which reaches the changed path.

The legacy claim in ssh_worker() now takes the channel id as part of
its condition and marks the session connected only once the id is
stored, the same order wsShellStartCb() uses.

Issue: CID-656285
Copilot AI lite review requested due to automatic review settings September 23, 2026 17:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

What changed in this PR

This PR fixes the echoserver legacy channel claim by validating channel ID retrieval before marking the session connected.

Changes:

  • Requires WS_SUCCESS from wolfSSH_ChannelGetId().
  • Prevents invalid sessions from entering the connected state.
File Description
examples/​echoserver/​echoserver.c Validates channel ID retrieval during legacy session setup.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #1274

Scan targets checked: wolfssh-src, wolfssh-bugs

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

@philljj
philljj merged commit 07a16f6 into wolfSSL:master Sep 23, 2026
200 checks passed
@ejohnstown
ejohnstown deleted the sf27 branch September 23, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants