Skip to content

Fix minor issues and Add unit tests#982

Open
yosuke-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:f_fix
Open

Fix minor issues and Add unit tests#982
yosuke-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:f_fix

Conversation

@yosuke-wolfssl
Copy link
Copy Markdown
Contributor

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

This PR fixes the following issues:

  • Add a size check against maximum packet size in DoChannelData and DoChannelExtendedData
  • Add a recipient_channel field validation in DoChannelSuccess and DoChannelFailure
  • Add an EOF check in SendChannelData and SendChannelExtendedData
  • Suppress want_reply for exit-status, exit-signal and window-change to comply with RFC4254.

Also, this adds new unit tests accordingly.

Addressed by f_866, f_867, f_1690 and f_3447.

@yosuke-wolfssl yosuke-wolfssl self-assigned this May 15, 2026
Copilot AI review requested due to automatic review settings May 15, 2026 06:40
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 tightens channel message validation and adds internal unit tests for the new channel handling behavior.

Changes:

  • Validates recipient channel IDs for CHANNEL_SUCCESS and CHANNEL_FAILURE.
  • Adds max packet size and EOF checks for channel data send/receive paths.
  • Suppresses replies for RFC-defined no-reply channel requests and adds unit coverage for several new paths.

Reviewed changes

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

File Description
wolfssh/internal.h Exposes additional internal test wrappers under WOLFSSH_TEST_INTERNAL.
src/internal.c Updates channel request/data handling and adds internal wrapper implementations.
tests/unit.c Adds unit tests for channel success/failure, data overflow, and EOF send behavior.

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

Comment thread src/internal.c
Comment thread src/internal.c
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #982

Scan targets checked: wolfssh-bugs, wolfssh-src

No new issues found in the changed files. ✅

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