search menu icon-carat-right cmu-wordmark

CERT Coordination Center

LibTIFF vulnerable to integer overflow in the TIFFFetchStrip() routine

Vulnerability Note VU#539110

Original Release Date: 2005-01-20 | Last Revised: 2005-08-23

Overview

An integer overflow in LibTIFF may allow a remote attacker to execute arbitrary code.

Description

LibTIFF is a library used to encode and decode images in Tag Image File Format (TIFF). An integer overflow in the TIFFFetchStripThing() routine within the tif_dirread.c file may allow an attacker to cause a heap-based buffer overflow. A lack of input validation on user-controlled data concerning the size of an TIFF image may allow a remote attacker to manipulate a call to malloc() to create a buffer with insufficient size. When data is copied to this under-sized buffer, a heap-based buffer overflow may occur.

Note that in order to exploit this vulnerability, an attacker must craft a TIFF image with the STRIPOFFSETS flag set.

This vulnerability is believed to related to the integer overflows described in VU#687568.

Impact

If a remote attacker can persuade a user to access a specially crafted TIFF image, that attacker may be able to execute arbitrary code with the privileges of that user.

Solution

Upgrade


This issue has been corrected in LibTIFF versions 3.7.0.

Workarounds


Do Not Accept TIFF Files from Unknown or Untrusted Sources

Exploitation occurs by accessing a specially crafted TIFF file (typically .tiff or .tif extension). By only accessing TIFF files from trusted or known sources, the chances of exploitation are reduced.

Vendor Information

539110
 

View all 37 vendors View less vendors


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

This vulnerability was reported by iDefense Security.iDefense credits infamous41md with discovering this vulnerability.

This document was written by Jeff Gennari.

Other Information

CVE IDs: CVE-2004-1307
Severity Metric: 5.04
Date Public: 2004-12-21
Date First Published: 2005-01-20
Date Last Updated: 2005-08-23 15:37 UTC
Document Revision: 73

Sponsored by CISA.