__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN GNOME Foundation Display Manager gdmchooser [Public Advisory: 12.14.06] December 14, 2006 19:00 GMT Number R-081 ______________________________________________________________________________ PROBLEM: Local exploitation of a format string vulnerability in GNOME Foundation's GNOME Display Manager host chooser window (gdmchooser) could allow an unauthenticated attacker to execute arbitrary code on the affected system. PLATFORM: versions 2.14.11, 2.16.4, and 2.17.4 of the GNOME Display Manager DAMAGE: Successful local exploitation of this vulnerability would allow an unauthenticated attacker to execute arbitrary code with the privileges of the gdm service. In order to exploit this vulnerability, the attacker would need to have physical access to the system running gdmchooser. Connecting remotely to this service will not work as the functionality is designed to connect to a remote server already, and proxying is not allowed. SOLUTION: Apply current patches. ______________________________________________________________________________ VULNERABILITY The risk is MEDIUM. Could allow an unauthenticated attacker to ASSESSMENT: execute arbitrary code with the privileges of the gdm service. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/r-081.shtml ORIGINAL BULLETIN: http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=453 CVE: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6105 ______________________________________________________________________________ [***** Start Public Advisory: 12.14.06 *****] GNOME Foundation Display Manager gdmchooser Format String Vulnerability I. BACKGROUND The gdmchooser program provides XDMCP (X Display Manager Control Protocol) functionality to the GNOME Display Manager. This protocol allows a user to interact remote systems via the local X11 display. II. DESCRIPTION Local exploitation of a format string vulnerability in GNOME Foundation's GNOME Display Manager host chooser window (gdmchooser) could allow an unauthenticated attacker to execute arbitrary code on the affected system. The vulnerability specifically exists in the handling of values entered when choosing a remote host to connect to from the current system. The following snippet from gdmchooser.c shows the vulnerable code: 1395 msg = g_strdup_printf (_("Cannot find the host \"%s\". " 1396 "Perhaps you have mistyped it."), 1397 name); 1398 1399 dialog = ve_hig_dialog_new 1400 (GTK_WINDOW (chooser) /* parent */, 1401 GTK_DIALOG_MODAL /* flags */, 1402 GTK_MESSAGE_ERROR, 1403 GTK_BUTTONS_OK, 1404 _("Cannot find host"), 1405 msg); 1406 1407 g_free (msg); 1408 The error dialog uses the temporary value 'msg', constructed from 'name' when the host is not found. By supplying a sequence of formatting operations which modify memory values, an unauthenticated attacker can execute code with the permissions under the gdm account. III. ANALYSIS Successful local exploitation of this vulnerability would allow an unauthenticated attacker to execute arbitrary code with the privileges of the gdm service. In order to exploit this vulnerability, the attacker would need to have access to the system running gdmchooser. Connecting remotely to this service will not work as the functionality is designed to connect to a remote server already, and proxying is not allowed. The attacker selects the option to run the gdmchooser, and then types the format string into the dialog box. They could construct a format string which displays the contents of the stack or writes controlled values to arbitrary memory locations. This allows execution of code with the privileges of the gdmchooser, typically the user 'gdm'. Although this user does not have a high privilege level, once this account has been gained, it would be relatively simple to insert a logger into gdm processes to capture other users passwords. The gdmchooser is not accessible from the default login screens in any of the tested Red Hat systems, however the preferences utility does contain some preset screens which do contain it. IV. DETECTION This vulnerability has been confirmed to exist in the gdm-2.14.1-1 RPM from Red Hat Fedora Core 5. The vulnerability was introduced into the gdmchooser.c file in version 1.78 of gdm2/gui/gdmchooser.c in the GNOME CVS source code repository. V. WORKAROUND If XDMCP functionality is not required, setting the permissions on the gdmchooser to not allow execution will prevent any attempts at exploitation. VI. VENDOR RESPONSE The GNOME maintainers have addressed this problem by releasing versions 2.14.11, 2.16.4, and 2.17.4 of the GNOME Display Manager. VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2006-6105 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 12/04/2006 Initial vendor notification 12/05/2006 Initial vendor response 12/14/2006 Coordinated public disclosure IX. CREDIT The discoverer of this vulnerability wishes to remain anonymous. Get paid for vulnerability research http://labs.idefense.com/methodology/vulnerability/vcp.php Free tools, research and upcoming events http://labs.idefense.com/ X. LEGAL NOTICES Copyright © 2006 iDefense, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDefense. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please e-mail customer service for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. [***** End Public Advisory: 12.14.06 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of iDefense Labs for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 925-422-8193 (7x24) FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@ciac.org Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ Anonymous FTP: ftp.ciac.org PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained via WWW at http://www.first.org/. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) R-071: Cisco Security Agent Management Center LDAP Administrator Authentication Bypass R-072: Security Vulnerabilities in Solaris ld.so.1(1) R-073: Vulnerability in SNMP (926247) R-074: Cumulative Security Update for Internet Explorer (925454) R-075: Vulnerability in Visual Studio 2005 (925674) R-076: Vulnerability in Windows Media Format (923689) R-077: Vulnerability in Windows (926255) R-078: Cumulative Security Update for Outlook Express (923694) R-079: Vulnerability in Remote Installation Service (926121) R-080: Symantec Veritas NetBackup