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 1173052 - X11 forwarding fails if AddressFamily not inet and no IPV6 addresses configured
Summary: X11 forwarding fails if AddressFamily not inet and no IPV6 addresses configured
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openssh
Version: 6.5
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jakub Jelen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-11 11:10 UTC by Gerrit Slomma
Modified: 2017-09-01 20:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-11 09:08:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gerrit Slomma 2014-12-11 11:10:51 UTC
Description of problem:

X11 forwarding does not work if AddressFamily is not inet and no IPv6-Address is configured. Default is "AddressFamily any"

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

openssh.x86_64                                               5.3p1-94.el6
openssh-server.x86_64                                        5.3p1-94.el6

How reproducible:

Login, e.g. via ssh -X root@server, echo $DISPLAY, is empty

Steps to Reproduce:
1. ssh -X root@server
2. echo $DISPLAY
3.

Actual results:
$DISPLAY is empty

Expected results:
$DISPLAY must be set

Additional info: All ethernet-devices configured with IPV6INIT=no

Edit /etc/ssh/sshd_config as follows:

--- /etc/ssh/sshd_config.rpmnew 2013-09-30 09:08:17.000000000 +0200
+++ /etc/ssh/sshd_config        2014-12-11 11:55:40.682415229 +0100
@@ -12,6 +12,7 @@

 #Port 22
 #AddressFamily any
+AddressFamily inet
 #ListenAddress 0.0.0.0
 #ListenAddress ::

restart sshd, login an verify via echo $DISPLAY that $DISPLAY now indeed is set.
X11-applications could now be launched remotely.

Comment 2 Jakub Jelen 2015-01-22 10:35:26 UTC
Thank you for taking the time to enter a bug report with us. We appreciate the feedback and look to use reports such as this to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to  guarantee the timeliness or suitability of a resolution.

If this issue is critical or in any way time sensitive, please raise a ticket through your regular Red Hat support channels to make certain  it receives the proper attention and prioritization to assure a timely resolution. 

For information on how to contact the Red Hat production support team, please visit:
https://access.redhat.com/support/policy/support_process


To this case,
if I properly disable ipv6, according to:
https://access.redhat.com/solutions/8709
respectively in /etc/sysctl.conf:
> net.ipv6.conf.eth0.disable_ipv6 = 1
It works for me without any problems.


If I leave ipv6 enabled and remove ipv6 addresses from all inteusing 
# /sbin/ifconfig <interface> inet6 del <ipv6address>/<prefixlength>
I'm also unable to reproduce your problem.


Using current version of openssh:
openssh-5.3p1-104.el6.x86_64

Can you specify your reproducer how to get to your state or retest it with current version?

Comment 3 Otto J. Makela 2015-01-30 14:25:22 UTC
I can confirm this very same problem on Fedora21 with openssh-6.6.1p1-11.1.fc21.x86_64 -- I had to add "AddressFamily inet" into sshd_config after disabling IPv6 via the /etc/sysctl.conf method.

This same openssh problem has already been around at least five years, also has Debian and Ubuntu bugs issued to it (the latter also has a suggested patch):

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595014
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/882878

Comment 4 Jakub Jelen 2015-01-30 17:29:33 UTC
Now I can reproduce this behaviour on my Fedora 21, but still not on RHEL 6

# echo "net.ipv6.conf.eth0.disable_ipv6 = 1" >> /etc/sysctl.conf
# service sshd restart

and from different shell
# ssh -X f21
X11 forwarding request failed on channel 0
# rpm -q openssh
openssh-6.6.1p1-11.1.fc21.x86_64


Yes, there is more information about this problem even in upstream bugzilla [1], [2] and [3], but no final resolution.

It doesn't look like there will be some resolution in upstream. The solution in your linked patch [4] has some issues, namely CVE-2008-1483, as stated in [3], so I think the solution will be one of these:
1) Configure your IPv6 address or disable it (correctly).
2) Configure your openssh (to use or not to use IPv6) according to your network configuration.


[1] https://bugzilla.mindrot.org/show_bug.cgi?id=1457
[2] https://bugzilla.mindrot.org/show_bug.cgi?id=2143
[3] https://bugzilla.mindrot.org/show_bug.cgi?id=1356
[4] https://build.opensuse.org/package/view_file/openSUSE:Factory/openssh/openssh-6.5p1-X_forward_with_disabled_ipv6.patch?rev=1c09c84b8dda320105cf7b59928951c4

Comment 6 RHEL Program Management 2015-11-11 09:08:09 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.


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