RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1321136 - nc is not backwards compatible, breaking existing software
Summary: nc is not backwards compatible, breaking existing software
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nmap
Version: 7.0
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-24 18:32 UTC by Quanah Gibson-Mount
Modified: 2021-03-18 12:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-25 13:09:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Quanah Gibson-Mount 2016-03-24 18:32:29 UTC
Description of problem:

Prior to the RHEL 7.2 release, netcat/nc was broken due to bug#1192143.

Now that is fixed, netcat/nc is now broken in that it is no longer BACKWARDS COMPATIBLE with every previous release of nc.


Version-Release number of selected component (if applicable):

nmap-ncat-6.40-7.el7.x86_64


How reproducible:

100%

Steps to Reproduce:
1. Use the -w # option with nc

Actual results:

It throws an error and exits.


Expected results:

Maybe it gives a warning and continues.  But even the warning is unnecessary.


Additional info:

RHEL6 behavior:

echo REWRITE opendkim | /usr/bin/nc -w 120 localhost 7171
SUCCESS REWRITES COMPLETE
echo $?
0

RHEL7 behavior:

echo REWRITE opendkim | /usr/bin/nc -w 120 localhost 7171
Ncat: Since April 2010, the default unit for -w is seconds, so your time of "120" is 2.0 minutes. Use "120ms" for 120 milliseconds. QUITTING.
echo $?
2

Comment 2 Quanah Gibson-Mount 2016-03-28 15:33:42 UTC
Also note, it is impossible to use "s" with the version of nc in RHEL6:

[quanah@ldap01 ~]$ which nc
/usr/bin/nc
[quanah@ldap01 ~]$ nc -w 120s ldap01.zimbra.com 389
nc: timeout cannot be negative
[quanah@ldap01 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)


which means now that there's no way to be compatible when using nc for software on both RHEL6 and RHEL7.

Comment 3 Quanah Gibson-Mount 2016-03-28 15:34:14 UTC
Broken in 7.0 through 7.2

Comment 4 Robert Scheck 2016-05-01 00:10:25 UTC
Cross-filed case 01626771 on the Red Hat customer portal.

Comment 6 Michal Hlavinka 2016-10-25 13:09:46 UTC
nmap's ncat is not a drop in replacement for nc and it does not want to be that, so it is expected not to be compatible with nc. If you really need backward compatibility, let me point you to bug #1383127 = request to bring back original nc. (note: that bug is not publicly visible, but you can ask in your support ticket to be added to cc-list if you want).

Comment 7 Robert Scheck 2016-10-25 14:24:12 UTC
I am sorry, I disagree with this. You, Red Hat, can not simply switch from
a well known working software such as BSD's nc to the broken "nmap-netcat"
being a somewhat incompatible replacement. This especially applies, when the
original /usr/bin/nc is not made a symlink for alternatives usage, but a
fixed symlink to ncat. A symlink to alternatives would at least allow EPEL
package maintainers to ship the original BSD nc additionally without causing
a file conflict.

I am updating our ticket on the Red Hat customer portal accordingly: Either
this issue gets fixed, or the nc symlink shall point to alternatives(1).

Comment 8 Robert Scheck 2016-10-25 14:28:41 UTC
Note: Original BSD nc is likely the best, but also the hardest option to get - 
given this switch could maybe break other stuff in RHEL, right?

Comment 9 Michal Hlavinka 2016-10-25 14:40:45 UTC
I'm not exactly the best person to answer what is or is not likely. My own opinion is that returning to orignial nc would be best option. nmap-ncat is not primary interest of nmap's upstream, BSD nc is still quite a standard or it was for a long time and I think it would still be better. If there is sufficient demand from customers for bug #1383127 (bring back original nc), it should be possible to get it approved by management and bring it back.

There is no problem with using alternatives, if there is requested (bug rfe) for it, but it should probably by option b, not a.

Comment 10 Robert Scheck 2021-03-18 12:17:11 UTC
Given Red Hat is obviously not interested in shipping the OpenBSD nc (or netcat) utility in RHEL, bug #1939769 finally brings this package now back using the EPEL repository.


Note You need to log in before you can comment on or make changes to this bug.