Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | [Full-disclosure] iDEFENSE Security Advisory 11.15.05: Multiple Vendor GTK+ gdk-pixbuf XPM Loader Heap Overflow Vulnerability |
|---|---|
| Date: | Tue, 15 Nov 2005 17:49:01 -0500 |
Multiple Vendor GTK+ gdk-pixbuf XPM Loader Heap Overflow Vulnerability
iDEFENSE Security Advisory 11.15.05 www.idefense.com/application/poi/display?id=339&type=vulnerabilities November 15, 2005
I. BACKGROUND
GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites.
II. DESCRIPTION
Remote exploitation of heap overflow vulnerability in various vendors' implementations of the GTK+ gdk-pixbuf XPM image rendering library could allow for arbitrary code execution.
The vulnerability specifically exists due to an integer overflow while processing XPM files. The following code snippet illustrates the vulnerability:
if (n_col <= 0 || n_col >= G_MAXINT / (cpp + 1)) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("XPM file has invalid number of colors"));
return NULL;
}
[...]
colors = (XPMColor *) g_try_malloc ((sizeof (XPMColor) * n_col));
[...]
The validity check of n_col is enough to prevent an integer overflow in the first g_try_malloc, however there is not a proper check for the second g_try_malloc, which allows an undersized heap buffer to be allocated, then overflowed while using n_col as an upper bounds in a copying loop. This can be used to execute arbitrary code via traditional heap overflow 4 byte write methods or by overwriting adjacent areas of the heap with important values such as function pointers.
III. ANALYSIS
Exploitation could allow for arbitrary code execution in the context of the user running the affected application. As this library is used in a variety of applications, this vulnerability could be exploited either remotely, via a networked application or locally.
IV. DETECTION
iDEFENSE has confirmed the existence of this vulnerability in gtk+ 2.4.0 compiled from source. It is suspected that previous versions are also affected by this vulnerability. The following vendors include susceptible GTK+ and GdkPixBuf packages within their respective operating system distributions:
The Debian Project:
Debian GNU/Linux 3.0 and 3.1 (all architectures)
Mandriva (formerly Mandrakesoft):
Mandriva Linux (formerly Mandrakelinux) 10.0 and 10.1,
Corporate Server 3.0
Novell Inc.:
SuSE Linux 8.2, 9.0, 9.1 and 9.2
Red Hat Inc.:
Red Hat Enterprise Linux 2.1, 3, 4,
Fedora Core 3, 4V. WORKAROUND
Users should not open untrusted media files.
VI. VENDOR RESPONSE
Red Hat Inc.:
"This issue affects the gtk2 packages as shipped with Red Hat Enterprise Linux 3 and 4, and the gdk-pixbuf packages as shipped with Red Hat Enterprise Linux 2.1, 3, and 4. Updates to these packages are available at the URL below or by using the Red Hat Network up2date tool. http://rhn.redhat.com/errata/CVE-2005-3186.html
This issue affects the gtk2 and gdk-pixbuf packages as shipped with Fedora Core 3 and 4."
VII. CVE INFORMATION
The Common Vulnerabilities and Exposures (CVE) project has assigned the name CAN-2005-3186 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
10/12/2005 Initial vendor notification 10/14/2005 Initial vendor response 11/15/2005 Coordinated public disclosure
IX. CREDIT
infamous41md is credited with the discovery of this vulnerability.
Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp
Free tools, research and upcoming events http://labs.idefense.com
X. LEGAL NOTICES
Copyright © 2005 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 email customerservice@idefense.com 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.
_______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [Full-disclosure] Re: [xfocus-AD-051115]Multiple antivirus failed to scan malicous filename bypass vulnerability, Thierry Zoller |
|---|---|
| Next by Date: | [Full-disclosure] iDEFENSE Security Advisory 11.15.05: Multiple Vendor Insecure Call to CreateProcess() Vulnerability, labs-no-reply@idefense.com |
| Previous by Thread: | [Full-disclosure] [xfocus-AD-051115]Multiple antivirus failed to scan malicous filename bypass vulnerability, alert7@xfocus.org |
| Next by Thread: | [Full-disclosure] iDEFENSE Security Advisory 11.15.05: Multiple Vendor Insecure Call to CreateProcess() Vulnerability, labs-no-reply@idefense.com |
| Indexes: | [Date] [Thread] [Top] [All Lists] |