CVE-2014-8128: Integer Overflow
LibTIFF prior to 4.0.4, as used in Apple iOS before 8.4 and OS X before 10.10.4 and other products, allows remote attackers to cause a denial of service (out-of-bounds write) via a crafted TIFF image.
Other sources
Multiple out-of-bounds writes were reported in various libtiff tools:
- CVE-2014-8128 libtiff: Out-of-bounds Write in the thumbnail tool http://bugzilla.maptools.org/showbug.cgi?id=2489 - CVE-2014-8128 libtiff: Out-of-bounds Write in the tiffdither tool http://bugzilla.maptools.org/showbug.cgi?id=2490 - CVE-2014-8128 libtiff: Out-of-bounds Write in the tiffdither tool http://bugzilla.maptools.org/showbug.cgi?id=2491 - CVE-2014-8128 libtiff: Out-of-bounds Write in the tiffdither tool http://bugzilla.maptools.org/showbug.cgi?id=2492 - CVE-2014-8128 libtiff: Out-of-bounds Write in the thumbnail and tiffcmp tools http://bugzilla.maptools.org/showbug.cgi?id=2493 - CVE-2014-8128 libtiff: Out-of-bounds Write in the tiff2pdf tool http://bugzilla.maptools.org/showbug.cgi?id=2495
Above upstream bugs were fixed by the below commits:
2014-12-21 Even Rouault <even.rouault> tools/thumbnail.c: fix out-of-buffer write http://bugzilla.maptools.org/showbug.cgi?id=2489 (CVE-2014-8128)
2014-12-21 Even Rouault <even.rouault> libtiff/tifnext.c: check that BitsPerSample = 2. Fixes http://bugzilla.maptools.org/showbug.cgi?id=2487 (CVE-2014-8129)
2014-12-21 Even Rouault <even.rouault> tools/thumbnail.c, tools/tiffcmp.c: only read/write TIFFTAGGROUP3OPTIONS or TIFFTAGGROUP4OPTIONS if compression is COMPRESSIONCCITTFAX3 or COMPRESSIONCCITTFAX4 http://bugzilla.maptools.org/showbug.cgi?id=2493 (CVE-2014-8128)
2014-12-21 Even Rouault <even.rouault> Fix various crasher bugs on fuzzed images. libtiff/tifdir.c: TIFFSetField(): refuse to set negative values for TIFFTAGXRESOLUTION and TIFFTAGYRESOLUTION that cause asserts when writing the directory libtiff/tifdirread.c: TIFFReadDirectory(): refuse to read ColorMap or TransferFunction if BitsPerSample has not yet been read, otherwise reading it later will cause user code to crash if BitsPerSample > 1 libtiff/tifgetimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8 libtiff/tifnext.c: in the "run mode", use tilewidth for tiled images instead of imagewidth to avoid crash tools/bmp2tiff.c: fix crash due to int overflow related to input BMP dimensions tools/tiff2pdf.c: fix crash due to invalid tile count (should likely be checked by libtiff too). Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB tools/tiffcrop.c: fix crash due to invalid TileWidth/TileHeight tools/tiffdump.c: fix crash due to overflow of entry count.
2014-12-21 Even Rouault <even.rouault> tools/tiff2pdf.c: check return code of TIFFGetField() when reading TIFFTAGSAMPLESPERPIXEL
The below bugs are not yet fixed:
- CVE-2014-8128 libtiff: Out-of-bounds Write in the thumbnail and tiffcmp tools http://bugzilla.maptools.org/showbug.cgi?id=2499 - CVE-2014-8128 libtiff: Out-of-bounds Writes in the tiffdither tool http://bugzilla.maptools.org/showbug.cgi?id=2501
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/tiffto a version that resolves this vulnerability.Fixed in 3.9.4-5+squeeze12Fixed in 4.0.2-6+deb7u7Fixed in 4.0.3-12.3 - Upgrade
Upgrade
debian/tiff3to a version that resolves this vulnerability.Fixed in 3.9.6-11+deb7u1
Event History
Frequently Asked Questions
Which systems and workflows are most exposed to this issue?
Systems using LibTIFF before 4.0.4 are affected, particularly where the vulnerable thumbnail, tiffdither, tiffcmp, or tiff2pdf tools process TIFF files. Apple iOS versions before 8.4 and OS X versions before 10.10.4 are specifically identified as affected uses of LibTIFF.
What does an attacker need to exploit the vulnerability?
An attacker needs to supply a crafted TIFF image that is processed by an affected LibTIFF tool or product. No attacker privileges are required, but user interaction is required according to the supplied vector.
What is the impact of successful exploitation?
Successful processing of the crafted image can trigger an out-of-bounds write and cause a denial of service. The provided impact information indicates availability impact only, with no confidentiality or integrity impact listed.
What can be done if updating is not immediately possible?
Avoid processing untrusted TIFF images with the affected LibTIFF tools, including thumbnail, tiffdither, tiffcmp, and tiff2pdf. Restrict TIFF handling to trusted inputs until the affected software can be updated.