Accusoft ImageGear TIFF TIF_decode_thunderscan code execution vulnerability
A specially crafted TIFF file causes an out-of-bounds write in the TIF_decode_thunderscan function of the Accusoft ImageGear library, because a size derived from a file byte exceeds the buffer allocated from another file value. An attacker who supplies a malformed file to a victim could achieve remote code execution.
Originally disclosed on Cisco Talos
An exploitable out-of-bounds write vulnerability exists in the igcore19d.dll TIFdecodethunderscan function of Accusoft ImageGear 19.3.0 library. A specially crafted TIFF file can cause an out of bounds write, resulting in a remote 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
Likely the buffer is allocated using a size derived from one file value (divided by two), but the copy length is computed from a separate byte read from the file without checking it against the buffer capacity.
Impact
The out-of-bounds write could allow an attacker to gain remote code execution when a victim opens the malformed file.
What the attacker needed
Victim opens a malformed TIFF file; attacker can deliver the file
The fix
The vendor patched the issue, though the text does not describe the code change.
How it was found
- Open a malformed TIFF file through the library's file-loading function.
- The decoder reads a size value from the file and allocates a one-byte destination buffer.
- It then reads a byte from the file whose derived length is larger than the buffer.
- The copy writes past the end of the buffer, 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.
ImageGear is a toolkit that programs use to open and convert image files. When it reads a particular kind of TIFF image, it works out how much memory to reserve from one number in the file, but then copies a larger amount based on another number in the file. That writes past the end of the reserved memory, which 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.