Skip to content
Memory corruption Advisory Advanced CVE-2016-8387

Iceni Argus PDF Inflate+LZW Decompression Heap-Based Buffer Overflow Vulnerability

A heap-based buffer overflow occurs in Iceni Argus when converting a malformed PDF with an object encoded using multiple encoding types ending in LZW, because the LZW decoder lacks a bounds check on its output buffer. An attacker could exploit this to execute code under the context of the user running the converter.

Marcin Noga Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable heap-based buffer overflow exists in Iceni Argus. When it attempts to convert a malformed PDF with an object encoded w/ multiple encoding types terminating with an LZW encoded type, an overflow may occur due to a lack of bounds checking by the LZW decoder.

Marcin Noga, 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

The LZW decoder loop writes bytes to a fixed-size buffer without checking whether the write pointer has exceeded the buffer's bounds, and the loop only terminates when it encounters an end-of-data code.

Impact

An attacker could execute arbitrary code under the context of the user running the converter, but the report does not demonstrate a full exploit beyond a crash.

What the attacker needed

Victim opens a malformed PDF; PDF object uses multiple encodings ending in LZW

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.

A PDF file can contain compressed data using several methods, including LZW. The program that converts PDFs to HTML has a fixed-size memory area for decompressing LZW data, but it does not check when it writes past the end of that area. By crafting a PDF that makes the decompression loop run too long, an attacker can overwrite adjacent memory and potentially 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 Marcin Noga

View all

7 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.