nc doesn't support "-s IP" option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcat-openbsd (Debian) |
Fix Released
|
Unknown
|
|||
netcat-openbsd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* This worked in former relases, so from a LTS->LTS upgraders POV it is
an upgrade regression
* The impact is that local source (-s) can no more be used as before
* The fix is backporting the fix that we made in Debian (but without all
the noise of the arg parsing rewrite for SRU simplicity)
[Test Case]
* Run with local source port, like your local SSH for example:
$ netcat -s 127.0.0.1 127.0.0.1 22 < /dev/null
[Regression Potential]
* the Minimized change (compared to the big change that versions going
forward got) should be safe as it just allows a case that was formerly
forbidden in arg-parsing. Never the less there could be a regression if
one of those combinations causes an issue when ran where it formerly
just was denied on arg parse. Think a script that since Bionic fails
(due to this bug) but once enabled will "work" and DUE TO THAT might
then trigger actions that are an issue.
Never the less, since currently in Bionic this just fails, I'd assume
the this is a rather theoretical risk - and being a regression to
former releases we should fix it to make LTS->LTS upgraders suffer
less.
[Other Info]
* n/a
Hey,
netcat shows a usage error if i try to use the "-s" option:
Example in Bionic:
$ netcat -s 127.0.0.1 127.0.0.1 22 < /dev/null
usage: nc [-46CDdFhklNnrS
[-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[
Example in Xenial:
netcat -s 127.0.0.1 127.0.0.1 22 < /dev/null
SSH-2.0-
Manpage shows that the option is still availible and should work. Both systems use openbsd netcat.
$ type netcat
netcat is hashed (/bin/netcat)
$ ls -lah /bin/netcat
lrwxrwxrwx 1 root root 24 Apr 25 21:56 /bin/netcat -> /etc/alternativ
$ ls -lah /etc/alternativ
lrwxrwxrwx 1 root root 15 Apr 25 21:56 /etc/alternativ
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: netcat-openbsd 1.187-1
ProcVersionSign
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
Date: Fri Apr 27 13:41:20 2018
Dependencies:
gcc-8-base 8-20180414-1ubuntu2
libbsd0 0.8.7-1
libc6 2.27-3ubuntu1
libgcc1 1:8-20180414-
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: netcat-openbsd
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Andreas Hasenack: Approve
- Canonical Server packageset reviewers: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 30 lines (+10/-1)2 files modifieddebian/changelog (+9/-0)
debian/patches/misc-failures-and-features.patch (+1/-1)
Changed in netcat-openbsd (Debian): | |
status: | Unknown → New |
Changed in netcat-openbsd (Debian): | |
status: | New → Fix Committed |
Changed in netcat-openbsd (Debian): | |
status: | Fix Committed → Fix Released |
-t in description (typo) mislead me - fixed the description