Computerinsel Photoline PCX Bits Per Pixel Code Execution Vulnerability
A PCX image parser in Photoline 20.53 miscalculates the size of compressed colour-map data, so a crafted run-length-encoded image causes an out-of-bounds write with attacker-controlled bytes. An attacker could deliver such an image to a victim and potentially gain code execution.
Originally disclosed on Cisco Talos
A memory corruption vulnerability exists in the PCX-parsing functionality of Computerinsel Photoline 20.53. 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 uses a run-length value taken from the image data as a loop counter without validating it against the destination buffer size, and the compressed data size is calculated incorrectly.
Impact
A crafted PCX image could cause an out-of-bounds write and potentially code execution when opened by the victim.
What the attacker needed
Victim opens a crafted PCX image; attacker can deliver the image 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.
Image editors must read file formats carefully. Here the program trusts a length value stored inside the image file and uses it to decide how many bytes to copy into a fixed buffer, without checking it fits. A malicious image can therefore make the program write past the end of its memory, which can crash it 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.