Skip to content

Conversation

@MegaManSec
Copy link
Contributor

i is taken from pointer[length-2] (often the IAC byte) before we do length -= 2, so using pointer[i] indexes an arbitrary/stale byte unrelated to the option code. pointer[0] is the suboption’s option code per the telnet SB format, so printing pointer[0] yields correct, stable diagnostics.

i is taken from pointer[length-2] (often the IAC byte) before we do length -= 2,
so using pointer[i] indexes an arbitrary/stale byte unrelated to the option code.
pointer[0] is the suboption’s option code per the telnet SB
format, so printing pointer[0] yields correct, stable diagnostics.
@MegaManSec
Copy link
Contributor Author

Note: An initial analysis showed this may actually patch an OOB read, but I think that isn't possible.

@bagder bagder closed this in eb88092 Oct 5, 2025
@bagder
Copy link
Member

bagder commented Oct 5, 2025

Thanks!

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