Skip to content

telnet: abort on bad suboption sequence - #20108

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/telnet-error-abort
Closed

bagder wants to merge 1 commit into
masterfrom
bagder/telnet-error-abort

Conversation

@bagder

@bagder bagder commented Dec 29, 2025

Copy link
Copy Markdown
Member

Instead of trying to repair.

Reported-by: Huseyin Tintas

Instead of trying to repair.

Reported-by: Huseyin Tintas

Copilot AI 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.

Pull request overview

This PR changes the telnet protocol handler to abort on malformed suboption sequences instead of attempting to repair them. This is a security-focused change that removes complex error recovery logic that could potentially lead to infinite loops or other issues.

Key Changes:

  • Removed error recovery logic for malformed telnet suboptions
  • Simplified error handling to fail immediately with clear error message
  • Removed unused process_iac label

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

@bagder
bagder marked this pull request as ready for review December 29, 2025 09:15
@bagder

bagder commented Dec 29, 2025

Copy link
Copy Markdown
Member Author

augment review

@augmentcode

augmentcode Bot commented Dec 29, 2025

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Telnet suboption parsing now aborts immediately when an invalid IAC suboption sequence is encountered, instead of trying to recover.
Why: This avoids attempting to “repair” malformed suboptions, which could otherwise lead to incorrect parsing or looping behavior.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode 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.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread lib/telnet.c
@bagder bagder closed this in bc9ab55 Dec 29, 2025
@bagder
bagder deleted the bagder/telnet-error-abort branch December 29, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants