Package: netcat-openbsd
Version: 1.219-1
Severity: normal
X-Debbugs-Cc: uklei...@debian.org

Hello,

if netcat is talking to a remote peer that implements a telnet-like
protocol (e.g. rfc2217 in my case), IAC should be quoted. That is

        printf '01234\xff\xfb\x015678' | nc -t ::1 12345

should actually send

        01234\xff\xff\xfb\x015678

because otherwise the stream is interpreted on the other side as a
command. On the receiving side the matching unquoting should happen.

(Look at the effect if the other side happens to be

        nc -t -l :: 12345

. The problem is that nc assumes it never sent a WILL request and so
should safely reply to the DONT reply with a WONT. The fix is to quote
the IAC such that the assumption "nc never sent a WILL request" becomes
true. See https://www.rfc-editor.org/rfc/rfc854, GENERAL CONSIDERATIONS
for more details.)

Best regards
Uwe

Reply via email to