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 1160487 - Master dies when using -o ProxyCommand
Summary: Master dies when using -o ProxyCommand
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openssh
Version: 6.6
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Petr Lautrbach
QA Contact: Stanislav Zidek
URL:
Whiteboard:
Depends On:
Blocks: 1138860 1153397 1159820 1161144
TreeView+ depends on / blocked
 
Reported: 2014-11-04 23:35 UTC by Ben Woodard
Modified: 2019-07-11 08:19 UTC (History)
17 users (show)

Fixed In Version: openssh-5.3p1-105.el6
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
: 1161144 (view as bug list)
Environment:
Last Closed: 2015-07-22 06:46:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to fix the problem. (2.75 KB, patch)
2014-11-04 23:35 UTC, Ben Woodard
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1335 0 normal SHIPPED_LIVE openssh bug fix and enhancement update 2015-07-20 17:52:59 UTC

Description Ben Woodard 2014-11-04 23:35:49 UTC
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

Comment 1 Ben Woodard 2014-11-04 23:38:54 UTC
 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.

Comment 4 Ben Woodard 2014-11-05 00:25:27 UTC
This is a regression WRT to the previous version of OpenSSH in RHEL6.

Comment 8 Petr Lautrbach 2014-11-06 09:46:04 UTC
I confirm that the patch applies cleanly and is part of rhel-7 code base. Thanks for that.

Comment 15 errata-xmlrpc 2015-07-22 06:46:39 UTC
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


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