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

Computerinsel Photoline PCX Parsing Code Execution Vulnerability

A heap-based out-of-bounds write exists in the PCX parsing code of Computerinsel Photoline 20.02. An attacker can supply a crafted PCX file to corrupt memory and potentially execute code.

Piotr Bania Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An memory corruption vulnerability exists in the .PCX parsing functionality of Computerinsel Photoline 20.02. A specially crafted .PCX file can cause a vulnerability resulting in potential code execution.

Piotr Bania, 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

The PCX decoder uses an attacker-controlled run-length count to copy bytes into a heap buffer without validating that the count fits within the allocated buffer size.

Impact

A crafted PCX file can cause heap memory corruption, which may lead to code execution under the context of the application.

What the attacker needed

Victim opens a crafted PCX file

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 the program opens a PCX image file, it reads a run-length encoded byte that tells it how many times to copy the next byte. The program trusts this count without checking it against the size of the memory buffer, so a malicious file can write past the end of the buffer. This memory corruption could let an attacker run their own code on the victim's computer.

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 Piotr Bania

View all

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