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

Iceni Argus PDF TextToPolys Rasterization Code Execution Vulnerability

An integer overflow in Iceni Argus when converting a malformed PDF to XML causes a buffer to be allocated with a size smaller than needed, leading to a heap buffer overflow when rasterizing a polygon. An attacker could exploit this to execute code under the context of the user running the tool.

Marcin Noga Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable integer-overflow vulnerability exists within Iceni Argus. When it attempts to convert a malformed PDF to XML, it will attempt to convert each character from a font into a polygon and then attempt to rasterize these shapes.

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

Likely the product of two dimensions used for allocation is not checked for integer overflow, so a smaller buffer is allocated than the number of pixels later written.

Impact

This could lead to code execution under the context of the account running the tool.

What the attacker needed

Victim opens a malformed PDF; tool processes the PDF

How it was found

  1. Create a malformed PDF that triggers the vulnerable code path.
  2. Open the PDF with Iceni Argus or a tool that uses it, such as MarkLogic Server's converter.
  3. The tool processes text and converts characters to polygons.
  4. During polygon filling, an integer overflow causes an undersized buffer allocation.
  5. The tool writes pixel data beyond the buffer, causing a crash or potential code execution.

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.

When a program needs to store data, it calculates how much space to reserve. Here, a multiplication used to calculate that space can overflow, making the program reserve too little memory. Later, when it writes data into that memory, it writes past the end, corrupting other memory and potentially allowing 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 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.