Bug 982516

Summary: openssh complains about an unset $DISPLAY
Product: [openSUSE] openSUSE Distribution Reporter: Peter van Hoof <pvh>
Component: OtherAssignee: Petr Cerny <pcerny>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: astieger, pvh
Version: Leap 42.1   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 42.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: extract from /var/log/zypp/history

Description Peter van Hoof 2016-06-01 10:10:56 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0
Build Identifier: 

After upgrading to the latest OpenSSH, if you have a configuration
that enables X forwarding in general but your current session does
not have $DISPLAY set, ssh prints an error message about it on every
connection. Specifically, it reports:

	DISPLAY "(null)" invalid; disabling X11 forwarding

This behavior did not exist before the upgrade. This is a divergence from historical behavior and screws up any number of things.

Reproducible: Always

Steps to Reproduce:
1.Have a host, call it THEHOST, and a key that will work for the host, call it $HOME/.ssh/id_rsa.
2.Run:
   env - ssh -F /dev/null -o "ForwardX11 yes" -i $HOME/.ssh/id_rsa THEHOST /bin/true

Actual Results:  
ssh complains:
   DISPLAY "(null)" invalid; disabling X11 forwarding

Expected Results:  
No complaint. Silence about $DISPLAY being unset, because this is routine.

OpenSSH version: openssh-6.6p1-11.1.x86_64

This report is a carbon copy of

https://bugzilla.redhat.com/show_bug.cgi?id=1303260
Comment 1 Andreas Stieger 2016-06-01 15:37:19 UTC
You mention an upgrade. Which version are you updating from?
Comment 2 Peter van Hoof 2016-06-02 04:51:24 UTC
I wouldn't know where to find that information. I run updates every night, so it must have been the previous most up-to-date version of openssh. Anyway, the reported behavior is new and I have not seen it in any version of openssh I ever used.

PS - I believe this is the upstream bug report mentioned in the Fedora bug report

https://bugzilla.mindrot.org/show_bug.cgi?id=2535
Comment 3 Andreas Stieger 2016-06-02 07:22:40 UTC
So I understand that previously this is on openSUSE Leap 42.1, with an openssh package also from that distribution, and that your bug report relates to a maintenance update, not an upgrade from a different distribution.

To get the update history for openssh, run the following:
> grep openssh /var/log/zypp/history > openssh-history.txt

Please attach the file to this bug.

Please also downgrade openssh to each of the earlier versions to verify that they did not expose the behavior:

zypper in --oldpackage openssh=6.6p1-8.1
zypper in --oldpackage openssh=6.6p1-6.3
Comment 4 Peter van Hoof 2016-06-02 07:33:04 UTC
Created attachment 679193 [details]
extract from /var/log/zypp/history
Comment 5 Peter van Hoof 2016-06-02 07:37:11 UTC
The statements in comment 3 are correct.

I can confirm that downgrading to openssh=6.6p1-8.1 and openssh=6.6p1-6.3 makes the reported behavior go away.
Comment 6 Andreas Stieger 2016-06-02 07:42:54 UTC
Okay the issue seems to be localized in the OpenSSH package, the commit in question was introduced with the fixes for bug 962313 for CVE-2016-1908
Comment 7 Tomáš Chvátal 2018-04-13 15:18:38 UTC
This is automated batch bugzilla cleanup.

The openSUSE 42.1 changed to end-of-life (EOL [1]) status. As such
it is no longer maintained, which means that it will not receive any
further security or bug fix updates.
As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
openSUSE, or you can still observe it under openSUSE Leap 15.0, please
feel free to reopen this bug against that version (see the "Version"
component in the bug fields), or alternatively open
a new ticket.

Thank you for reporting this bug and we are sorry it could not be fixed
during the lifetime of the release.

[1] https://en.opensuse.org/Lifetime