Computerinsel Photoline TGA Parsing Code Execution Vulnerability
A specially crafted .TGA image file causes an out-of-bounds write in Computerinsel Photoline 20.02 because a value read from the file is used as a loop repeat count for repeated memory copies. An attacker could send such a file to a victim and potentially achieve code execution.
Originally disclosed on Cisco Talos
A memory corruption vulnerability exists in the .TGA parsing functionality of Computerinsel Photoline 20.02. A specially crafted .TGA file can cause an out of bounds write resulting in potential 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
Root cause
A dword value taken directly from the .TGA file is used unchecked as a loop repeat count for repeated memcpy operations, so the copy runs past the allocated buffer.
Impact
Opening a malicious .TGA file causes an out-of-bounds write that crashes the application and could potentially lead to code execution.
What the attacker needed
Victim opens a crafted .TGA 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 viewers read numbers from inside an image file to decide how much data to copy. Here the program trusted one of those numbers without checking it, so it kept copying past the end of its memory buffer. A file crafted to abuse this can crash the program and, in the worst case, 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.