Penetration testing at its best.

Network penetration testing, web application security, firewall review, CHECK pen testing, server build review, social engineering..


GIMP FIT File Format DoS

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.

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

  • CVE number: CVE-2012-3236
  • Vendor homepage: http://www.gimp.org/
  • Vendor notified: 25/05/2012
  • Found by: Joseph Sheridan, Director of Reaction Information Security

About ReactionIS

Reaction Information Security is a leading independent pen test consultancy specialising in delivering the highest quality services including network pen testing and web application security testing. As a CESG CHECK Service Provider we are authorised to carry out penetration testing on classified government networks.

Affected Products

GIMP <= 2.8.0 (Windows or Linux builds)

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).

Distribution

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

  • bugtraq () securityfocus com
  • full-disclosure () lists grok org uk

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 current page for any updates.

Pen test

Get a Quote Online

Submit your testing requirements online and one of the team will get right back to you.

Penetration Testing Services

Firewall reviews, database audits, code reviews, social engineering and more..

Application Security

Ensure your web and mobile apps are safe from attack.

Read more