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

Iceni Argus TrueType Font File Cmap Table Code Execution Vulnerability

A heap-based buffer overflow exists in Iceni Argus when it converts a PDF containing a malformed embedded font. A signedness mistake causes an undersized buffer to be returned, and the tool then reads font data into it, which can lead to code execution as 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 PDF containing a malformed font to XML, the tool will attempt to use a size out of the font to search through a linked list of buffers to return.

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 a signed comparison in the buffer allocation routine lets a negative or wrapped size match any existing buffer in a linked list, so an undersized buffer is handed back and then filled with more data than it holds.

Impact

A crafted PDF could cause a heap overflow that may lead to code execution under the context of the user running the converter.

What the attacker needed

Victim opens a crafted PDF in the converter

How it was found

  1. Open a PDF containing a malformed embedded font in the Iceni Argus conversion tool.
  2. The tool parses the font and reads the cmap table, clamping the subtable count to a fixed maximum.
  3. A size taken from the cmap offset table is added to the object's base size.
  4. That size is passed to the buffer allocator, which returns an undersized buffer because of the signedness issue.
  5. The tool reads font data into the undersized buffer, overflowing the heap.

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 buffer is a fixed-size area of memory used to hold data. Here the program asks for a buffer of a certain size but, because of a sign mistake in the size calculation, it gets back a smaller one and then writes more data into it than fits, corrupting nearby memory. An attacker who can get a crafted PDF processed could use that corruption to run their own code on the machine.

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.