Accusoft ImageGear PSD read_icc_icCurve_data heap-based buffer overflow vulnerability
A heap-based buffer overflow exists in the PSD read_icc_icCurve_data functionality of Accusoft ImageGear 19.9. A specially crafted malformed file can cause an integer overflow that leads to a heap buffer overflow, allowing an attacker to write out-of-bounds data controlled from the file.
Originally disclosed on Cisco Talos
A heap-based buffer overflow vulnerability exists in the PSD readiccicCurvedata functionality of Accusoft ImageGear 19.9. A specially crafted malformed file can lead to an integer overflow that, in turn, leads to a heap buffer overflow.
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 size for a memory allocation is computed by shifting a user-controlled count value left by 3 bits, which can overflow and result in a very small buffer, leading to an out-of-bounds write.
Impact
An attacker could cause an out-of-bounds write with data controlled from the file, potentially leading to code execution or a crash.
What the attacker needed
Victim opens a malicious PSD file
How it was found
- Craft a PSD file with a malicious icc curv tag containing a large count value.
- Load the malformed PSD file using the ImageGear library.
- The library reads the count and allocates a small buffer due to integer overflow.
- The library writes curve data out of bounds, causing a crash.
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.
This report describes a memory corruption bug in a library that reads image files. When the library processes a malicious PSD file, it miscalculates how much memory to reserve, so it writes data past the end of a small buffer. An attacker could use this to crash the program or possibly 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.