Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packetparser Ignore Spurious Invalid Input at Beginning of Stream #140

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

sawka
Copy link
Member

@sawka sawka commented Dec 13, 2023

Possible fix for #99. Add a flag to have the parser ignore spurious input that happens before seeing a real packet. Normally that spurious input is converted in a RawPacket. Those RawPackets cause connection errors (since the code on the other side is waiting for an InitPacket). This flag will let the parser ignore input until it sees a valid packet.

We also need to force all of the paths that use this new flow to output a valid packet. That's why I added the "ping" packets in the mshell commands.

… packet. the complication here was ensuring we always output a real packet in every flow so we don't actually lose valid errors.
@sebastiangebhardt
Copy link

Short, question. I have an ssh server configured with a banner message at connect. I get an error like this:
prompt> error connecting to remote: invalid packet received from mshell client: raw[=== BANNER TEXT===]
prompt> error reading from controlling-pty: read /dev/ptmx: input/output error
Maybe this is fixed by this pull request?

@sawka sawka merged commit a639d72 into main Dec 18, 2023
4 checks passed
@sawka sawka deleted the packetparser-ignore-invalid branch December 27, 2023 00:07
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.

2 participants