Package: netcat-openbsd
Version: 1.190-1

Hi,
while triaging [1] I realized Debian is affected as well and the change is
from Guilhem, so I wanted to report to you as well.

Some details:
-s is broken, e.g. example from the man page:
# netcat -s 10.1.2.3 host.example.com 42
usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl]
          [-m minttl] [-O length] [-P proxy_username] [-p source_port]
          [-q seconds] [-s source] [-T keyword] [-V rtable] [-W recvlimit]
[-w timeout]
          [-X proxy_protocol] [-x proxy_address[:port]]
 [destination] [port]

This is since 1.187-1 by this change:
  commit 2ebffb014c830e49f6fad600c59cc1b82fe356a4
  Author: Guilhem Moulin <guil...@debian.org>
  Date: Sun Dec 3 22:58:11 2017 +0100
    Allow usage of -s with -l for consistency with netcat-traditional.

In gdb I see it gets to read -s

                case 's':
                        sflag = optarg;
                        break;

It realizes no more options are there and then ends at
        } else if (argv[0] && argv[1]) {
                host = argv[0];
                uport = &argv[1];
                if (pflag || sflag)
                        usage(1);

Thereby this check doesn't allow slfag/pflag along with "two arg usage"

It might even be correct to do so, I'm really not deep into netcat, but if
so I don#t see it immediately and would appreciate your explanation (or
help on a fix if it really is an issue).

[1]: https://bugs.launchpad.net/ubuntu/+source/netcat-openbsd/+bug/1767283

-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

Reply via email to