Mandrake Linux Security Advisory : libtiff (MDKSA-2006:137)

High Nessus Plugin ID 23886


The remote Mandrake Linux host is missing one or more security updates.


Tavis Ormandy, Google Security Team, discovered several vulnerabilities the libtiff image processing library :

Several buffer overflows have been discovered, including a stack buffer overflow via TIFFFetchShortPair() in tif_dirread.c, which is used to read two unsigned shorts from the input file. While a bounds check is performed via CheckDirCount(), no action is taken on the result allowing a pathological tdir_count to read an arbitrary number of unsigned shorts onto a stack buffer. (CVE-2006-3459)

A heap overflow vulnerability was discovered in the jpeg decoder, where TIFFScanLineSize() is documented to return the size in bytes that a subsequent call to TIFFReadScanline() would write, however the encoded jpeg stream may disagree with these results and overrun the buffer with more data than expected. (CVE-2006-3460)

Another heap overflow exists in the PixarLog decoder where a run length encoded data stream may specify a stride that is not an exact multiple of the number of samples. The result is that on the final decode operation the destination buffer is overrun, potentially allowing an attacker to execute arbitrary code. (CVE-2006-3461)

The NeXT RLE decoder was also vulnerable to a heap overflow vulnerability, where no bounds checking was performed on the result of certain RLE decoding operations. This was solved by ensuring the number of pixels written did not exceed the size of the scanline buffer already prepared. (CVE-2006-3462)

An infinite loop was discovered in EstimateStripByteCounts(), where a 16bit unsigned short was used to iterate over a 32bit unsigned value, should the unsigned int (td_nstrips) have exceeded USHORT_MAX, the loop would never terminate and continue forever. (CVE-2006-3463)

Multiple unchecked arithmetic operations were uncovered, including a number of the range checking operations deisgned to ensure the offsets specified in tiff directories are legitimate. These can be caused to wrap for extreme values, bypassing sanity checks. Additionally, a number of codepaths were uncovered where assertions did not hold true, resulting in the client application calling abort(). (CVE-2006-3464)

A flaw was also uncovered in libtiffs custom tag support, as documented here While well formed tiff files must have correctly ordered directories, libtiff attempts to support broken images that do not. However in certain circumstances, creating anonymous fields prior to merging field information from codec information can result in recognised fields with unexpected values. This state results in abnormal behaviour, crashes, or potentially arbitrary code execution. (CVE-2006-3465)

The updated packages have been patched to correct these issues.


Update the affected packages.

Plugin Details

Severity: High

ID: 23886

File Name: mandrake_MDKSA-2006-137.nasl

Version: $Revision: 1.17 $

Type: local

Published: 2006/12/16

Modified: 2016/09/26

Dependencies: 12634

Risk Information

Risk Factor: High


Base Score: 7.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:C

Vulnerability Information

CPE: p-cpe:/a:mandriva:linux:lib64tiff3, p-cpe:/a:mandriva:linux:lib64tiff3-devel, p-cpe:/a:mandriva:linux:lib64tiff3-static-devel, p-cpe:/a:mandriva:linux:libtiff-progs, p-cpe:/a:mandriva:linux:libtiff3, p-cpe:/a:mandriva:linux:libtiff3-devel, p-cpe:/a:mandriva:linux:libtiff3-static-devel, cpe:/o:mandriva:linux:2006

Required KB Items: Host/local_checks_enabled, Host/cpu, Host/Mandrake/release, Host/Mandrake/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2006/08/01

Exploitable With

Metasploit (Apple iOS MobileMail LibTIFF Buffer Overflow)

Reference Information

CVE: CVE-2006-3459, CVE-2006-3460, CVE-2006-3461, CVE-2006-3462, CVE-2006-3463, CVE-2006-3464, CVE-2006-3465

MDKSA: 2006:137

CWE: 189