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

Apache OpenOffice PPT PPTStyleSheet nLevel Code Execution Vulnerability

A specially crafted PPT file can cause an out-of-bounds write in Apache OpenOffice's PPTStyleSheet constructor because the number of style levels is not validated against the fixed array size. An attacker could exploit this to achieve arbitrary code execution.

Marcin 'Icewall' Noga Follow

Originally disclosed on Cisco Talos

High 8.3 View original

An exploitable out of bound write vulnerability exists in the PPTStyleSheet::PPTStyleSheet functionality of Apache OpenOffice. A specially crafted PPT file can cause an out of bound write resulting in arbitrary 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

Impact

This out-of-bounds write could lead to arbitrary code execution.

What the attacker needed

Victim opens a malicious PPT file

How it was found

  1. Open a malformed PPT file in Apache OpenOffice Impress.
  2. The file contains a PPT_PST_TxMasterStyleAtom record with a crafted nLevelAnz value.
  3. The parser reads nLevelAnz and enters a loop that writes to maParaLevel and maCharLevel using an index that exceeds the array bounds.
  4. The out-of-bounds write causes an access violation, as shown in the debugger.

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 OpenOffice opens a PowerPoint file, it reads a number that says how many text style levels to expect. The program stores these levels in a fixed-size list of five slots, but it does not check if the number is larger than five. If the file claims there are many more levels, the program writes past the end of the list, which can crash or let an attacker 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.