Bug 1303260

Summary: ssh from openssh-7.1p2-2.fc23 complains incessantly about an unset $DISPLAY
Product: [Fedora] Fedora Reporter: Chris Siebenmann <cks-rhbugzilla>
Component: opensshAssignee: Jakub Jelen <jjelen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: jjelen, mattias.ellert, mgrepl, plautrba, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openssh-7.1p2-4.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-28 12:20:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Siebenmann 2016-01-30 00:46:24 UTC
Description of problem:

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 is a divergence from historical behavior and screws up any
number of things.

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

openssh-7.1p2-2.fc23.x86_64

How reproducible:

Completely reproducable.

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
3. See ssh complain:
   DISPLAY "(null)" invalid; disabling X11 forwarding

Actual results:

Complaint of:
	DISPLAY "(null)" invalid; disabling X11 forwarding

Expected results:

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

Comment 1 Chris Siebenmann 2016-01-30 00:47:54 UTC
I will note an additional issue here that just occurred to me: the
'(null)' portion of the message implies that ssh is calling something
in the printf() family on a NULL. Even if glibc catches this, this is
generally considered a bad idea.

(I expect it is not security sensitive these days, but it makes me
jumpy.)

Comment 2 Jakub Jelen 2016-01-31 12:49:16 UTC
This should be resolved in the current update:
https://bodhi.fedoraproject.org/updates/FEDORA-2016-72f953d453

Let me know if it works for you. About the comment #1, I will check it tomorrow.

Comment 3 Jakub Jelen 2016-02-01 08:41:00 UTC
Yes, you are right. This case is undefined behaviour (as far as I understand it) and it slipped through both upstream and mine reviews. I filled upstream bug.

Comment 4 Fedora Update System 2016-02-25 10:33:14 UTC
openssh-7.1p2-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-25e3f1c255

Comment 5 Fedora Update System 2016-02-26 20:53:23 UTC
openssh-7.1p2-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-25e3f1c255

Comment 6 Fedora Update System 2016-02-28 12:19:56 UTC
openssh-7.1p2-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.