OpenImageIO Project OpenImageIO ZfileOutput::close() denial of service vulnerability
A NULL pointer dereference in ZfileOutput::close() occurs when an ImageOutput object is created with a specification that fails validation, leaving the tile buffer uninitialised. An attacker can provide a malicious file to trigger a denial of service.
Originally disclosed on Cisco Talos
A denial of service vulnerability exists in the ZfileOutput::close() functionality of OpenImageIO Project OpenImageIO v2.4.4.2. A specially crafted ImageOutput Object can lead to denial of service.
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 ZfileOutput::open() function returns early on validation failure without initialising m_tilebuffer, and later close() attempts to use it.
Impact
A denial of service occurs as the program crashes due to a NULL pointer dereference.
What the attacker needed
Attacker controls input file or specification
The fix
The vulnerability was fixed in a vendor patch release.
How it was found
- Create an ImageOutput object for a .zfile output with a specification that fails validation (e.g., width or height less than 1, greater than 32767, depth greater than 1, or number of channels not equal to 1).
- The ZfileOutput::open() function returns false early, skipping the resizing of m_tilebuffer.
- When the ZfileOutput object is destroyed or close() is called, it attempts to write scanlines from the uninitialised m_tilebuffer, causing a NULL pointer dereference.
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.
OpenImageIO is a library for reading and writing image files. When it tries to write a specially crafted image, it can crash because it uses a memory buffer that was never set up. This crash stops the program from working, which is a denial of service.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.