Computerinsel Photoline PCX Run Length Encoding Code Execution Vulnerability
The PCX image parser in Computerinsel Photoline 20.54 mishandles run length encoding values, allowing a crafted image to push a write pointer past the end of its buffer. An attacker could deliver such an image to trigger an out-of-bounds write and potentially gain code execution.
Originally disclosed on Cisco Talos
A memory corruption vulnerability exists in the PCX-parsing functionality of Computerinsel Photoline 20.54. A specially crafted PCX image processed via the application can lead to an out-of-bounds write, overwriting arbitrary data.
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 parser advances its output pointer by the attacker-supplied run length without checking that the pointer stays within the allocated buffer.
Impact
A crafted PCX image could cause an out-of-bounds write and an exploitable condition, potentially leading to code execution when the victim opens the file.
What the attacker needed
Victim opens a crafted PCX image; Photoline 20.54 on OS X
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.
PCX is an old image format that stores repeated pixels in short runs, each run starting with a count of how many times a value repeats. The program trusts that count when moving its write position, so a file with an oversized count near the end makes it write past the memory it reserved. That kind of out-of-bounds write can crash the program or, in the right conditions, 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.