OpenImageIO Project OpenImageIO DPXOutput::close() information disclosure vulnerability
A specially crafted image file can cause OpenImageIO's DPX output code to read beyond the allocated heap buffer when writing a .dpx file, leaking heap data into the output image. An attacker who can supply a malicious input file to a program using OpenImageIO could disclose sensitive memory contents.
Originally disclosed on Cisco Talos
An information disclosure vulnerability exists in the DPXOutput::close() functionality of OpenImageIO Project OpenImageIO v2.4.4.2. A specially crafted ImageOutput Object can lead to leaked heap data.
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 a mismatch between the pixel format used to allocate the tile buffer and the format used when reading from it, because a copy of the image specification was updated without updating the original.
Impact
An attacker could disclose heap memory contents through the generated .dpx file, potentially leaking sensitive information.
What the attacker needed
Attacker controls input image file; program uses OpenImageIO to convert to .dpx
The fix
The vulnerability was fixed in a vendor patch release.
How it was found
- Provide a specially crafted input image file to a program that uses OpenImageIO to convert it to a .dpx file.
- The program opens the input and creates a DPXOutput object, passing the input's image specification.
- During DPXOutput::open, the tile buffer is allocated using the original pixel format size.
- During DPXOutput::close, the buffer is read using the updated pixel format size, causing an out-of-bounds read.
- The leaked heap data is written into the output .dpx file.
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 converts an image to a different format, it sometimes allocates a buffer based on the original image's pixel size. If the format changes during conversion, the buffer may be too small, and the program reads past its end, copying extra memory into the output file. This can leak sensitive data from the program's memory.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.