CVE-2014-8127: Integer Overflow

Published Jan 26, 2015
·
Updated

LibTIFF 4.0.3 allows remote attackers to cause a denial of service (out-of-bounds read and crash) via a crafted TIFF image to the (1) checkInkNamesString function in tifdir.c in the thumbnail tool, (2) compresscontig function in tiff2bw.c in the tiff2bw tool, (3) putcontig8bitCIELab function in tifgetimage.c in the tiff2rgba tool, LZWPreDecode function in tiflzw.c in the (4) tiff2ps or (5) tiffdither tool, (6) NeXTDecode function in tifnext.c in the tiffmedian tool, or (7) TIFFWriteDirectoryTagLongLong8Array function in tifdirwrite.c in the tiffset tool.

Other sources

Multiple out-of-bounds reads were reported in various libtiff tools:

http://bugzilla.maptools.org/showbug.cgi?id=2500 http://bugzilla.maptools.org/showbug.cgi?id=2497 http://bugzilla.maptools.org/showbug.cgi?id=2496 http://bugzilla.maptools.org/showbug.cgi?id=2485 http://bugzilla.maptools.org/showbug.cgi?id=2486 http://bugzilla.maptools.org/showbug.cgi?id=2484

Above upstream bugs were fixed by the below commits:

2014-12-21 Even Rouault <even.rouault> tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling TIFFTAGINKNAMES copying. The right fix would be to properly copy it, but not worth the burden for those esoteric utilities. http://bugzilla.maptools.org/showbug.cgi?id=2484 (CVE-2014-8127)

2014-12-21 Even Rouault <even.rouault> tools/tiff2bw.c: when Photometric=RGB, the utility only works if SamplesPerPixel = 3. Enforce that http://bugzilla.maptools.org/showbug.cgi?id=2485 (CVE-2014-8127)

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.

— Red Hat

Affected Software

7 affected componentsFixes available
LibTIFF libtiff=4.0.3
openSUSE openSUSE=13.1
openSUSE openSUSE=13.2
debian/tiff<4.0.6-3
4.0.6-3
debian/tiff<4.0.6-3
4.0.6-3
debian/tiff<4.0.6-3
4.0.6-3
debian/tiff
4.0.2-6+deb7u44.0.6-3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/tiff to a version that resolves this vulnerability.

    Fixed in 4.0.6-3
  2. Upgrade

    Upgrade debian/tiff to a version that resolves this vulnerability.

    Fixed in 4.0.2-6+deb7u4Fixed in 4.0.6-3
  3. Compensating control

    In libtiff TIFFSetField(), reject negative values for TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION.

  4. Compensating control

    In TIFFReadDirectory(), reject ColorMap or TransferFunction data if BitsPerSample has not yet been read.

  5. Compensating control

    In TIFFRGBAImageOK(), return FALSE for LOGLUV images unless SamplesPerPixel is 3, and for CIELAB images unless SamplesPerPixel is 3 and BitsPerSample is 8.

  6. Compensating control

    In tif_next.c run mode, use tilewidth rather than imagewidth for tiled images.

  7. Compensating control

    In bmp2tiff, prevent integer overflow when processing input BMP dimensions.

  8. Compensating control

    Disable TIFFTAG_INKNAMES copying in pal2rgb and thumbnail.

  9. Compensating control

    In tiff2bw, handle Photometric=RGB only when SamplesPerPixel is 3.

  10. Compensating control

    In tiff2pdf, reject invalid tile counts.

  11. Compensating control

    In tiffcrop, reject invalid TileWidth and TileHeight values.

  12. Compensating control

    In tiffdump, prevent overflow when processing the entry count.

Event History

Jan 26, 2015
Data Sourced
via Red Hat·10:42 AM
DescriptionSeverityAffected Software
Jun 26, 2017
CVE Published
via MITRE·03:00 PM
Data Sourced
via MITRE·03:00 PM
Description
Data Sourced
03:29 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·03:29 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2014-8127?

CVE-2014-8127 is considered a denial of service vulnerability that can potentially crash the application.

2

How do I fix CVE-2014-8127?

To fix CVE-2014-8127, you should upgrade to LibTIFF version 4.1.0 or higher as the vulnerability has been addressed in these versions.

3

What are the affected software versions for CVE-2014-8127?

CVE-2014-8127 affects LibTIFF version 4.0.3 and potentially other versions prior to 4.1.0.

4

Can CVE-2014-8127 be exploited remotely?

Yes, CVE-2014-8127 can be exploited remotely through crafted TIFF images.

5

What types of attacks are associated with CVE-2014-8127?

CVE-2014-8127 is associated with denial of service attacks that result from out-of-bounds read vulnerabilities.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203