Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Due to an error in the underlying code, the SSH master process previously in some cases terminated unexpectedly when the "ProxyCommand" parameter was used. This update fixes the code error and the described crash no longer occurs. In addition, this patch fixes the inconsistent behavior of the "ControlPersist=yes" parameter.
Created attachment 953873[details]
patch to fix the problem.
Description of problem:
Using ssh 5.3p1-104.el6.x86_64, the backport of the ControlPersist option has at least three related issues with it. In all cases, the attached patch contains code backported from RHEL 7 openssh-6.4p1-8.el7.src.rpm.
1) The commands below show that the ssh master process exits with a fatal error
# <gateway_host> = host running sshd
# <host> = host running sshd
$ ssh -F /dev/null \
-o ProxyCommand="sh -c '[ -e s ] || ssh -F /dev/null -fNMS s <gateway_host>; \
exec ssh -F /dev/null -NS s -W %h:%p h'" \
<host> echo Hello
Password:
Password:
Hello
channel_by_id: 2: bad id: channel free
Disconnecting: Received ieof for nonexistent channel 2.
Version-Release number of selected component (if applicable):
5.3p1-104.el6.x86_64
Customer has provided a patch that backports fixes to the code from RHEL7
The patch also backports demoting a non-fatal error message to a debug message in clientloop.c. Otherwise, the error below is seen from the master now that the master does not die due to issue 1.
# <host> = host running sshd
$ ssh -F /dev/null -fNMS s <host>
Password:
$ sh -c 'ssh -F /dev/null -S s h "sleep 5" & sleep 2; kill %1'
client_input_channel_req: unexpected channel -1
The attached patch corrects this bug in clientloop.c.
The commands and output below show that ControlPersist=yes does not work as expected. While a master mux connection is created in the background, the initial client connection is not made. Note how there is no output from the "echo Hello" command.
# <host> = host running sshd
$ ssh -F /dev/null -o ControlMaster=auto -S Test_Master_Socket -o ControlPersist=yes <host> echo Hello
$ ps -fu `whoami` | grep "[s]sh.*Test_Master_Socket"
py 13049 1 0 14:06 ? 00:00:00 /home/py/ssh/build/rpm_building/installed/usr/bin/ssh -F /dev/null -o ControlMaster=auto -S Test_Master_Socket -o ControlPersist=yes oslic echo Hello
$ ssh -F /dev/null -S Test_Master_Socket -O exit h
Exit request sent.
RHEL7 is not affected and the ControlPersists behavior works as expected there.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-1335.html
Created attachment 953873 [details] patch to fix the problem. Description of problem: Using ssh 5.3p1-104.el6.x86_64, the backport of the ControlPersist option has at least three related issues with it. In all cases, the attached patch contains code backported from RHEL 7 openssh-6.4p1-8.el7.src.rpm. 1) The commands below show that the ssh master process exits with a fatal error # <gateway_host> = host running sshd # <host> = host running sshd $ ssh -F /dev/null \ -o ProxyCommand="sh -c '[ -e s ] || ssh -F /dev/null -fNMS s <gateway_host>; \ exec ssh -F /dev/null -NS s -W %h:%p h'" \ <host> echo Hello Password: Password: Hello channel_by_id: 2: bad id: channel free Disconnecting: Received ieof for nonexistent channel 2. Version-Release number of selected component (if applicable): 5.3p1-104.el6.x86_64 Customer has provided a patch that backports fixes to the code from RHEL7