Описание
OpenEXR Makes Use of Uninitialized Memory
Summary
While fuzzing openexr_exrcheck_fuzzer, Valgrind reports a conditional branch depending on uninitialized data inside generic_unpack. This indicates a use of uninitialized memory (CWE-457). The issue is reproducible with the current OSS-Fuzz harness and a single-file PoC.
Details
Environment:
- Tooling:
valgrind --tool=memcheck --track-origins=yes - Target:
openexr_exrcheck_fuzzer - OS: Ubuntu 20.04.6 LTS focal x86_64
- openexr version and Git-commit hash:
openexr 3.4.2 | commit fd657e8a41e157e5841c7cc2e2a5efe094b069a1 (grafted, HEAD -> main, origin/main, origin/HEAD)
Function: generic_unpack
Possible root cause (based on observed symptoms): The unpacker is branching on bytes in a scratch buffer that were never written because the decode step didn’t fully populate it.
- The first use flagged is in
generic_unpack(). That function reads from the decompressed/expanded pixel buffer to scatter data into the framebuffer. A “conditional jump depends on uninitialised value(s)” means it’s consulting bytes in that buffer before they were written. - Valgrind says the uninitialised value “was created by a heap allocation (malloc)”, not the stack: this matches a per-tile/per-scanline decode scratch buffer allocated in
exr_decoding_run().
Valgrind Trace (top frames):
PoC
In the attached archive, you will find:
- The executable used for our tests.
- The testcase used to trigger the bug.
To observe the bug, simply run the OSS-Fuzz helper script:
Impact
- Undefined Behavior
- Potential crash
- Denial of Service
Credit: Aldo Ristori archive0.zip
Update Note:
Other saved testcases from the fuzzing campaign trigger the same underlying bug, but with a different manifestation. So there is one root cause (missing post-decode validation / zero-init before any unpack), with different call-sites. Below there are several archives, formatted like the previous one, that reproduce the other test cases.
Other observed sinks (distinct manifestations of the same bug):
Deep pointers path: generic_unpack_deep_pointers (deep scanline/tiled) archive1.zip
Deep sample table path: unpack_sample_table (deep scanline) archive2.zip
Half conversion path: half_to_float_buffer_f16c via unpack_half_to_float_3chan_planar archive3.zip
Deep compositing: CompositeDeepScanLine::readPixels → ThreadPool::addTask → LineCompositeTask::execute archive4.zip
Ссылки
- https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-3h9h-qfvw-98hq
- https://nvd.nist.gov/vuln/detail/CVE-2025-64181
- https://github.com/user-attachments/files/23024726/archive0.zip
- https://github.com/user-attachments/files/23024736/archive1.zip
- https://github.com/user-attachments/files/23024740/archive2.zip
- https://github.com/user-attachments/files/23024744/archive3.zip
- https://github.com/user-attachments/files/23024746/archive4.zip
Пакеты
OpenEXR
>= 3.3.0, < 3.3.6
3.3.6
OpenEXR
>= 3.4.0, < 3.4.3
3.4.3
Связанные уязвимости
OpenEXR provides the specification and reference implementation of the EXR file format, an image storage format for the motion picture industry. In versions 3.3.0 through 3.3.5 and 3.4.0 through 3.4.2, while fuzzing `openexr_exrcheck_fuzzer`, Valgrind reports a conditional branch depending on uninitialized data inside `generic_unpack`. This indicates a use of uninitialized memory. The issue can result in undefined behavior and/or a potential crash/denial of service. Versions 3.3.6 and 3.4.3 fix the issue.
OpenEXR provides the specification and reference implementation of the EXR file format, an image storage format for the motion picture industry. In versions 3.3.0 through 3.3.5 and 3.4.0 through 3.4.2, while fuzzing `openexr_exrcheck_fuzzer`, Valgrind reports a conditional branch depending on uninitialized data inside `generic_unpack`. This indicates a use of uninitialized memory. The issue can result in undefined behavior and/or a potential crash/denial of service. Versions 3.3.6 and 3.4.3 fix the issue.
OpenEXR provides the specification and reference implementation of the EXR file format, an image storage format for the motion picture industry. In versions 3.3.0 through 3.3.5 and 3.4.0 through 3.4.2, while fuzzing `openexr_exrcheck_fuzzer`, Valgrind reports a conditional branch depending on uninitialized data inside `generic_unpack`. This indicates a use of uninitialized memory. The issue can result in undefined behavior and/or a potential crash/denial of service. Versions 3.3.6 and 3.4.3 fix the issue.
OpenEXR provides the specification and reference implementation of the ...