copyright | disclaimer | privacy | contact  
Australia's Leading Computer Emergency Response Team
 
Search this site

 
On this site

 > HOME
 > About AusCERT
 > Membership
 > Contact Us
 > PKI Services
 > Publications
 > Sec. Bulletins
 > Conferences
 > News & Media
 > Services
 > Web Log
 > Site Map
 > Site Help
 > Member login





 

ESB-2007.0500 -- [Win][UNIX/Linux] -- Multiple Vendor GIMP Multiple Integer Overflow Vulnerabilities

Date: 10 July 2007
References: ESB-2007.0727  

Click here for printable version
Click here for PGP verifiable version
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                    ESB-2007.0500 -- [Win][UNIX/Linux]
      Multiple Vendor GIMP Multiple Integer Overflow Vulnerabilities
                               10 July 2007

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:              GIMP
Publisher:            iDEFENSE
Operating System:     Linux variants
                      Windows
Impact:               Execute Arbitrary Code/Commands
Access:               Existing Account
CVE Names:            CVE-2006-4519

Original Bulletin:    
    http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=551

Comment: There are several vulnerabilities found in image loader plug-ins. 
         These allow a maliciously constructed file to execute arbitrary 
         code in the context of the user opening the file.  The user must 
         be convinced of opening the file in GIMP for the attack to be 
         successful.

- --------------------------BEGIN INCLUDED TEXT--------------------

Multiple Vendor GIMP Multiple Integer Overflow Vulnerabilities

iDefense Security Advisory 07.09.07
http://labs.idefense.com/intelligence/vulnerabilities/
Jul 09, 2007

I. BACKGROUND

The GNU Image Manipulation Program is commonly known as the GIMP. It is
a freely distributed piece of software for such tasks as photo
retouching, image composition and image authoring. It is available, in
many languages, for multiple operating systems. More information is
available at the following URL.

http://www.gimp.org/

II. DESCRIPTION

Remote exploitation of multiple integer overflow vulnerabilities in
several of the image loader plug-ins included with distributions of
'The GIMP' allow attackers to crash The GIMP or potentially execute
arbitrary code with the privileges of the user.

The following lines show the location of some vulnerabilities within the
code responsible for loading the DICOM, PNM, PSD, PSP, Sun RAS, XBM, and
XWD file formats. Each of the files are located within the
plug-ins/common directory of the source code.

  dicom.c:391:      value = g_new0 (guint8, element_length + 4);
  pnm.c:566:  data = g_new (guchar, gimp_tile_height () * info->xres * np);
  pnm.c:628:  data = g_new (guchar, gimp_tile_height () * info->xres *
info->np);
  pnm.c:681:  data = g_new (guchar, gimp_tile_height () * info->xres);
  psd.c:2969:    PSDheader.rowlength = g_malloc (PSDheader.rows *
  psp.c:1225:      pixel = g_malloc0 (height * width * bytespp);
  sunras.c:955:  data = g_malloc (tile_height * width);
  sunras.c:1076:  data = g_malloc (tile_height * width);
  sunras.c:1146:  data = g_malloc (tile_height * width * 3);
  sunras.c:1231:  data = g_malloc (tile_height * width * 3);
  xbm.c:879:  data = (guchar *) g_malloc (width * tileheight);
  xwd.c:1193:  data = g_malloc (tile_height * width);
  xwd.c:1195:  scanline = g_new (guchar, xwdhdr->l_bytes_per_line + 8);
  xwd.c:1352:  data = g_malloc (tile_height * width);
  xwd.c:1441:  data = g_malloc (tile_height * width * 3);
  xwd.c:1601:  data = g_malloc (tile_height * width * 3);
  xwd.c:1812:  data = g_malloc (tile_height * width * bytes_per_pixel);

In each case, an integer value from an untrusted input source has
arithmetic operations performed upon it to calculate the length to
allocate. Since no integer overflow checking is performed, a
potentially exploitable heap overflow may result.

This is not a complete list of integer overflow vulnerabilities in the
code.

III. ANALYSIS

Exploitation allows attackers to execute arbitrary code in the context
of the user opening a malicious image file.

In order to be successful, the attacker must convince the victim into
opening a maliciously crafted image with The GIMP.

IV. DETECTION

iDefense has confirmed that version 2.2.15 of The GIMP is vulnerable on
both Linux and Windows platforms. It is suspected that all previous
versions of the GIMP are also affected.

V. WORKAROUND

Consider moving the affected loader modules from The GIMP's plug-in
directory to another location. The location in the file system may vary
depending on distributions. On Red Hat Linux and Debian systems the
default plug-in directory is /usr/lib/gimp/2.0/plug-ins.

VI. VENDOR RESPONSE

The GIMP maintainers have released version 2.2.16 to address these
vulnerabilities. For more information, consult the following URL.

http://developer.gimp.org/NEWS-2.2

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CVE-2006-4519 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

08/17/2006  Initial vendor notification
10/06/2006  Second vendor notification
06/26/2007  Third vendor notification
06/26/2007  Initial vendor response
07/09/2007  Coordinated public disclosure

IX. CREDIT

These vulnerabilities were discovered by Sean Larsson (iDefense Labs).

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  2007 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 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.
_______________________________________________

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================

-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBRpLKPyh9+71yA2DNAQLXsgQAi/y6KhYxredODgFysywtbjqSr3/ArUTC
TLuyWGaFL5Im2qf8icQiKNMUnb7RXj1q3o9nDL6VwqQH8CXW4MeHWpr7+jZ3RQCX
74R297czf83wUwmPiMfPcV3Jl5oQgVF3iPbOLvQ0kNQv8fIQoTyw+n9h9+zhaEtJ
u/XoGvwJ4nM=
=fG5w
-----END PGP SIGNATURE-----