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.
Originally disclosed on Cisco Talos
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.
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
- Open a malformed PPT file in Apache OpenOffice Impress.
- The file contains a PPT_PST_TxMasterStyleAtom record with a crafted nLevelAnz value.
- The parser reads nLevelAnz and enters a loop that writes to maParaLevel and maCharLevel using an index that exceeds the array bounds.
- 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.