LEADTOOLS TIF ImageWidth code execution vulnerability
A heap out-of-bounds write exists in LEADTOOLS' TIF image parsing when a crafted TIF causes an offset beyond the allocated buffer to be written, potentially leading to code execution.
Originally disclosed on Cisco Talos
An exploitable heap out-of-bounds write vulnerability exists in the TIF-parsing functionality of LEADTOOLS 20. A specially crafted TIF image can cause an offset beyond the bounds of a heap allocation to be written, potentially resulting in 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 allocation size calculation and the write offset calculation use inconsistent values (such as ImageWidth and SamplesPerPixel), so the offset can exceed the allocated buffer.
What the attacker needed
Victim opens a crafted TIF file
The fix
The vendor patched the vulnerability.
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 a program reads an image file, it sets aside a block of memory (a buffer) to hold the image data. If the file is crafted so that the program writes past the end of that block, it can corrupt other memory and sometimes let an attacker run their own code. This report describes such a flaw in a library that parses TIF images.
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.