Bug 769565 - VUL-1: CVE-2012-3236: gimp: NULL ptr crash in fit format handler
VUL-1: CVE-2012-3236: gimp: NULL ptr crash in fit format handler
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P4 - Low : Normal
: ---
Assigned To: Security Team bot
Security Team bot
. maint:released:sle11-sp1:48255 main...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-02 06:59 UTC by Sebastian Krahmer
Modified: 2015-02-19 03:19 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Krahmer 2012-07-02 06:59:18 UTC
Via OSS-sec:


Summary
=======

There is a file handling DoS in GIMP (the GNU Image Manipulation Program) for
the 'fit' file format affecting all versions (Windows and Linux) up to and
including 2.8.0. A file in the fit format with a malformed 'XTENSION' header
will cause a crash in the GIMP program.

CVE number: CVE-2012-3236
Vendor Homepage: http://www.gimp.org/
Date reported to vendor: 25/05/2012
Found by Joseph Sheridan:
href="http://www.reactionpenetrationtesting.co.uk/joseph-sheridan.html

This advisory is posted at:
http://www.reactionpenetrationtesting.co.uk/FIT-file-handling-DoS.html

PoC file is available here:
http://www.reactionpenetrationtesting.co.uk/vuln.fit

Affected Products
=================

Vulnerable Products
+------------------

The following products are known to be affected by this vulnerability:

  * GIMP <= 2.8.0 (Windows or Linux builds)

Products Not Vulnerable
+--------------------------------
  * GIMP 2.8.1

Details
=======

There is a file handling DoS in GIMP (the GNU Image Manipulation Program) for
the 'fit' file format affecting all versions (Windows and Linux) up to 2.8.0.
A file in the fit format with a malformed 'XTENSION' header will cause a crash
in the GIMP program. The flaw is triggered by opening a crafted 'fit' file or
allowing the file explorer dialog to preview the file.


A file in the fit format starting as follows will trigger the crash:
XTENSIONaaaaaaaaaaaaaaaaaaaaaa...aaaaaaaaaaaaaaaaaaaaaaaaHEADER2...

The vulnerable code is in the fits-io.c lines where the program attempts to
copy from a null pointer:

 {
   fdat = fits_decode_card (fits_search_card (hdr, "XTENSION"), typ_fstring);
   strcpy (hdulist->xtension, fdat->fstring);
 }

 This code can be patched by changing it to the following (as GIMP 2.8.1):

    fdat = fits_decode_card (fits_search_card (hdr, "XTENSION"), typ_fstring);
   if(fdat != NULL) {
    strcpy (hdulist->xtension, fdat->fstring);
   } else {
     strcpy (errmsg, "No valid XTENSION header found.");
     goto err_return;
   }

Impact
======

Successful exploitation of the vulnerability may result in an application
crash and denial of service.

Solution
===========
The GIMP team have provided an update for this issue (release 2.8.1).

Workarounds
===========

The fits-io.c file can be patched as above.


Distribution
============

In addition to posting on the website, a text version of this notice
is posted to the following e-mail and Usenet news recipients.

  * bugtraq () securityfocus com
  * full-disclosure () lists grok org uk
  * oss [dash] security [dash] subscribe [at] lists [dot] openwall [dot] com

Future updates of this advisory, if any, will be placed on the ReactionIS
corporate website, but may or may not be actively announced on
mailing lists or newsgroups. Users concerned about this problem are
encouraged to check the URL below for any updates:

http://www.reactionpenetrationtesting.co.uk/FIT-file-handling-DoS.html

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

[...]
Comment 1 Swamp Workflow Management 2012-07-02 22:00:12 UTC
bugbot adjusting priority
Comment 2 Swamp Workflow Management 2012-07-13 11:45:57 UTC
The SWAMPID for this issue is 48253.
This issue was rated as moderate.
Please submit fixed packages until 2012-07-27.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 3 Mu Lei 2012-07-16 10:09:42 UTC
please see bnc#763595
Comment 7 Matthias Weckbecker 2012-08-07 10:08:39 UTC
released
Comment 8 Swamp Workflow Management 2012-08-07 13:26:52 UTC
Update released for: gimp, gimp-branding-upstream, gimp-debuginfo, gimp-debugsource, gimp-devel, gimp-doc, gimp-lang, gimp-plugins-python
Products:
SLE-DEBUGINFO 11-SP1 (i386, ia64, ppc64, s390x, x86_64)
SLE-DESKTOP 11-SP1 (i386, x86_64)
SLE-DESKTOP 11-SP1-FOR-SP2 (i386, x86_64)
SLE-SDK 11-SP1 (i386, ia64, ppc64, s390x, x86_64)
SLE-SDK 11-SP1-FOR-SP2 (i386, ia64, ppc64, s390x, x86_64)
Comment 9 Swamp Workflow Management 2012-08-07 14:51:19 UTC
Update released for: gimp, gimp-debuginfo, gimp-devel
Products:
SLE-DESKTOP 10-SP4 (i386, x86_64)
SLE-SDK 10-SP4 (i386, ia64, ppc, s390x, x86_64)
Comment 12 Swamp Workflow Management 2012-09-03 09:09:49 UTC
openSUSE-SU-2012:1080-1: An update that fixes four vulnerabilities is now available.

Category: security (important)
Bug References: 724628,763595,769565,775433
CVE References: CVE-2012-2763,CVE-2012-3236,CVE-2012-3403,CVE-2012-3481
Sources used:
openSUSE 12.1 (src):    gimp-2.6.11-28.26.1
openSUSE 11.4 (src):    gimp-2.6.11-13.58.1
Comment 13 Bernhard Wiedemann 2012-09-07 13:00:28 UTC
This is an autogenerated message for OBS integration:
This bug (769565) was mentioned in
https://build.opensuse.org/request/show/133225 Evergreen:11.2 / gimp
Comment 14 Bernhard Wiedemann 2012-09-11 12:00:31 UTC
This is an autogenerated message for OBS integration:
This bug (769565) was mentioned in
https://build.opensuse.org/request/show/133620 Evergreen:11.2 / gimp