OpenImageIO Project OpenImageIO Image Output Close denial of service vulnerability
A crafted image specification with a tile width can cause BmpOutput::close() to recurse infinitely through write_scanlines and write_scanline, leading to a stack overflow. An attacker who controls the input file or specification could crash the process, causing a denial of service.
Originally disclosed on Cisco Talos
Multiple denial of service vulnerabilities exist in the image output closing functionality of OpenImageIO Project OpenImageIO v2.4.4.2. Specially crafted ImageOutput Objects can lead to multiple null pointer dereferences.
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, BmpOutput::close() calls write_scanlines, which calls BmpOutput::write_scanline, which calls close() again when the y coordinate exceeds the height, creating unbounded recursion.
Impact
An attacker who can control the input file or specification could cause a denial of service through a stack overflow crash.
What the attacker needed
Attacker controls input file or spec; output format is BMP; output spec has tile_width set
How it was found
- Provide an input file or specification that results in an ImageOutput object for a .bmp file.
- Ensure the output specification has a tile_width set.
- Trigger the close operation, either explicitly or via the destructor.
- The close path calls write_scanlines, which calls write_scanline with y greater than height.
- write_scanline calls close again, causing infinite recursion and a stack overflow.
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 that reads and writes many image formats. When saving a BMP image, a certain combination of settings makes the program call itself over and over until it runs out of memory for function calls and crashes. Someone who can supply the image settings can therefore stop the program from working.
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.