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.
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.)
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.
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.
openssh-7.1p2-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-25e3f1c255
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
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.