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 1527565 - Backport fix for regression introduced in OpenSSH 7.4 regarding root user and socket forwarding
Summary: Backport fix for regression introduced in OpenSSH 7.4 regarding root user and...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openssh
Version: 7.4
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Jakub Jelen
QA Contact: BaseOS QE Security Team
Depends On:
TreeView+ depends on / blocked
Reported: 2017-12-19 14:14 UTC by Sebastiaan
Modified: 2019-02-11 15:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-02-11 15:39:53 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
CentOS 14291 0 None None None 2017-12-19 14:14:42 UTC

Description Sebastiaan 2017-12-19 14:14:43 UTC
Description of problem:
In OpenSSH 7.4 there was a fix for refusing Unix-domain socket forwarding when privilege separation is disabled, but because privsep is always disabled for the root user, this broke socket forwarding for root. Would be nice to backport this fix in your 7.4 package.

Version-Release number of selected component (if applicable):
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
$ rpm -qi openssh-server
Name        : openssh-server
Version     : 7.4p1
Release     : 13.el7_4

How reproducible:

Steps to Reproduce:
1. Boot CentOS 7.4 machine
# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
# rpm -qi openssh-server
Name : openssh-server
Version : 7.4p1
Release : 13.el7_4
2. Try to forward a socket over SSH and access it
ssh -nNT -L /tmp/docker.sock:/var/run/docker.sock root@IP
3. Try to access the socket
DOCKER_HOST=unix:///tmp/docker.sock docker version

Actual results:
channel 1: open failed: administratively prohibited: open failed
channel 1: open failed: administratively prohibited: open failed

Expected results:
Output from the socket connection

Additional info:
In the OpenSSH 7.4 release notes (more info on https://bugs.chromium.org/p/project-zero/issues/detail?id=1010)

 * sshd(8): When privilege separation is disabled, forwarded Unix-
   domain sockets would be created by sshd(8) with the privileges of
   'root' instead of the authenticated user. This release refuses
   Unix-domain socket forwarding when privilege separation is disabled
   (Privilege separation has been enabled by default for 14 years).
   Reported by Jann Horn of Project Zero.

In OpenSSH 7.5 release notes:

 * sshd(8): Fix Unix domain socket forwarding for root (regression in
   OpenSSH 7.4).

More info here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858252;msg=9

Comment 2 Jakub Jelen 2018-01-02 08:09:25 UTC
Thank you for the report. We should certainly fix this with upstream fix or just enable privilege separation for root as we do it in Fedora at this moment (since even root can be confined by SELinux in RHEL/Fedora.

Comment 4 Jakub Jelen 2018-06-01 07:43:06 UTC
For the record, the upstream commit fixing this issue is this one:


Comment 5 Simo Sorce 2019-02-11 15:39:53 UTC
This issue was not selected to be included either in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small amount of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.

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