Skip to content
Memory corruption Advisory Advanced CVE-2020-6151

Accusoft ImageGear TIFF handle_COMPRESSION_PACKBITS memory corruption vulnerability

A memory corruption vulnerability exists in the TIFF handle_COMPRESSION_PACKBITS functionality of Accusoft ImageGear 19.7. A specially crafted malformed file can cause a memory corruption, potentially leading to code execution.

Emmanuel Tacheau Follow

Originally disclosed on Cisco Talos

High 8.1 View original

A memory corruption vulnerability exists in the TIFF handleCOMPRESSIONPACKBITS functionality of Accusoft ImageGear 19.7. A specially crafted malformed file can cause a memory corruption.

Emmanuel Tacheau, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely an integer overflow due to a missing or incorrect cast when computing the length of a run in PackBits decompression, leading to an out-of-bounds write.

Impact

An attacker could exploit this to cause memory corruption, potentially leading to code execution or a denial of service.

What the attacker needed

Victim opens a malicious TIFF file

How it was found

  1. Craft a malformed TIFF file that triggers the PackBits decompression path with a negative run length byte.
  2. Load the malformed TIFF file using the vulnerable ImageGear library.
  3. The library processes the file and reaches the handle_COMPRESSION_PACKBITS function.
  4. The function miscalculates the number of bytes to write due to an integer overflow.
  5. An out-of-bounds write occurs, causing memory corruption.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report describes a bug in a library that reads TIFF image files. When the library processes a specially crafted TIFF file, it miscalculates how much data to write into a memory buffer, causing it to write past the end of the buffer. This can crash the program or potentially allow an attacker to run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Emmanuel Tacheau

View all

58 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.