Skip to content

Including TTY_OP_END in terminal_modes triggers ‘Packet integrity error’ due to duplicate sentinel. #500

@irvingoujAtDevolution

Description

@irvingoujAtDevolution

For some SSH server, when manually including (Pty::TTY_OP_END, 0) in the list of terminal modes for a RequestPty message, some SSH servers immediately respond with a “Packet integrity error.” It appears that the Russh library already appends the end-of-list marker (TTY_OP_END) automatically. Adding another one by hand effectively inserts two sentinel opcodes, causing the server to reject the packet.

Steps to Reproduce:

Check out this branch.
Run any client code that includes (Pty::TTY_OP_END, 0) in the terminal_modes list.
Observe that the server disconnects with “Packet integrity error.

Reproduciable branch, inside example /russh/basic_ssh.rs
observie log in debug.log after running the example
https://github.com/irvingoujAtDevolution/russh-1/pull/new/debug-packet-integrity-error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions