Bug 1316829 (CVE-2016-3115)

Summary: CVE-2016-3115 openssh: missing sanitisation of input for X11 forwarding
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: carnil, Cy.Schubert, jjelen, magoldma, mattias.ellert, mgrepl, plautrba, slawomir, szidek, tmraz, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openssh 7.2p2 Doc Type: Bug Fix
Doc Text:
It was discovered that the OpenSSH server did not sanitize data received in requests to enable X11 forwarding. An authenticated client with restricted SSH access could possibly use this flaw to bypass intended restrictions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-21 21:03:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1316830, 1317816, 1317817, 1317818, 1317819, 1318201, 1318202    
Bug Blocks: 1316832    

Description Andrej Nemec 2016-03-11 09:11:18 UTC
Missing sanitisation of untrusted input allows an authenticated user who is able to request X11 forwarding to inject commands to xauth(1).

Injection of xauth commands grants the ability to read arbitrary files under the authenticated user's privilege. Other xauth commands allow limited information leakage, file overwrite, port probing and generally expose xauth(1), which was not written with a hostile user in mind, as an attack surface.

xauth(1) is run under the user's privilege, so this vulnerability offers no additional access to unrestricted accounts, but could circumvent key or account restrictions such as sshd_config ForceCommand, authorized_keys command="..." or restricted shells.

External references:

http://www.openssh.com/txt/x11fwd.adv

CVE assignment:

http://seclists.org/oss-sec/2016/q1/593

Comment 1 Andrej Nemec 2016-03-11 09:11:41 UTC
Created openssh tracking bugs for this issue:

Affects: fedora-all [bug 1316830]

Comment 2 Fedora Update System 2016-03-13 23:53:19 UTC
openssh-7.2p2-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Huzaifa S. Sidhpurwala 2016-03-15 10:19:28 UTC
Statement:

(none)

Comment 6 Martin Prpič 2016-03-15 11:36:28 UTC
Mitigation:

Set X11Forwarding=no in sshd_config.

For authorized_keys that specify a "command" restriction, this issue can be mitigated by also setting the "no-X11-forwarding" restriction. In OpenSSH 7.2 and later, the "restrict" restriction can be used instead, which includes the "no-X11-forwarding" restriction.

Comment 9 Tomas Hoger 2016-03-16 09:25:13 UTC
Created gsi-openssh tracking bugs for this issue:

Affects: fedora-all [bug 1318201]
Affects: epel-all [bug 1318202]

Comment 10 errata-xmlrpc 2016-03-21 20:18:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2016:0466 https://rhn.redhat.com/errata/RHSA-2016-0466.html

Comment 11 errata-xmlrpc 2016-03-21 20:45:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:0465 https://rhn.redhat.com/errata/RHSA-2016-0465.html

Comment 12 Fedora Update System 2016-03-26 18:12:36 UTC
openssh-7.2p2-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-03-29 19:19:34 UTC
openssh-6.9p1-11.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.