Skip to content
Memory corruption Advisory Advanced CVE-2017-2821

Lexmark Perceptive Document Filters PDF GfxFont Code Execution Vulnerability

A use-after-free in the PDF parsing of Lexmark Perceptive Document Filters allows a crafted PDF to cause code execution. An attacker can exploit this by convincing a victim to open a malicious PDF.

Marcin 'Icewall' Noga Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable use-after-free exists in the PDF parsing functionality of the Lexmark Perspective Document Filters 11.3.0.2400 and 11.4.0.2452. A crafted PDF document can lead to a use-after-free resulting in direct code execution.

Marcin 'Icewall' 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 GfxFont object is freed during font handling but later reused when the graphics state is restored, leading to a virtual call on a corrupted vtable.

Impact

An attacker could achieve arbitrary code execution by controlling the heap layout with crafted PostScript tags.

What the attacker needed

Victim opens a malicious PDF; Lexmark library processes the PDF

How it was found

  1. Open a malicious PDF with the Lexmark library.
  2. The PDF triggers font operations that free a GfxFont object.
  3. Later, a graphics state restore (Q operator) reuses the freed font object.
  4. A virtual function call on the freed object causes a crash or 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.

A use-after-free happens when a program frees memory but then keeps using it. Here, a PDF can trick the program into using freed memory that the attacker controls, letting them 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 'Icewall' Noga

View all

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