Corel PHOTO-PAINT X8 TIFF Filter Code Execution Vulnerability
A specially crafted TIFF file can cause an out-of-bounds write in Corel PHOTO-PAINT X8's TIFF parsing filter because a failed file read returns zero, which is later used in a subtraction that produces a huge size for a memory copy. An attacker could send such a file to a victim to trigger memory corruption, potentially leading to code execution.
A remote out of bound write vulnerability exists in the TIFF parsing functionality of Core PHOTO-PAINT X8 18.1.0.661. A specially crafted TIFF file can cause a vulnerability resulting in potential memory corruption.
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
Likely the program does not check the return value of ReadFile for zero before using it in a subtraction that underflows, leading to an out-of-bounds memcpy.
Impact
An attacker could send a malicious TIFF file to a victim, and when opened it could cause memory corruption, potentially leading to code execution under the user's privileges.
What the attacker needed
Victim opens a malicious TIFF file; Corel PHOTO-PAINT X8 installed
How it was found
- Craft a TIFF file with a tag of type 0x111 and a count attribute.
- Ensure the file ends so that ReadFile returns zero bytes read.
- Open the file in Corel PHOTO-PAINT X8 to trigger the parsing.
- The zero value is used in a subtraction, producing a huge size for memcpy.
- The memcpy writes out of bounds, causing an access violation.
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 reads a TIFF image file, it asks the operating system for some bytes. If the file ends early, the system says it read zero bytes. The program then uses that zero in a calculation that goes wrong, producing a very large number. It then tries to copy that many bytes into a small buffer, which corrupts memory and can crash the program 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.