Skip to content

OpenEXR 3.3.13 -> 3.3.14: IDManifest DoS (GHSA-rmgv-rm47-38g3, GHSA-5j5m-22wr-mhc6) - #114

Closed
danoli3 wants to merge 1 commit into
masterfrom
fix/openexr-idmanifest-dos
Closed

danoli3 wants to merge 1 commit into
masterfrom
fix/openexr-idmanifest-dos

Conversation

@danoli3

@danoli3 danoli3 commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Bumps vendored OpenEXR 3.3.13 -> 3.3.14. Checked the full upstream diff between those tags first: it's exactly two source-relevant files (ImfIDManifest.cpp + the version header), everything else in that release is CI manifests/CHANGES.md - so this is a genuine version bump, not a partial cherry-pick dressed up as one.

Fixes two unpatched holes in Source/OpenEXR/IlmImf/ImfIDManifest.cpp:

  • GHSA-rmgv-rm47-38g3 (High): manifestEntries is read straight from the decompressed payload and passed to resize() with no bounds check. A 349-byte EXR declaring 20M entries forces ~2.9GB resident, INT_MAX entries demands 288GiB.
  • GHSA-5j5m-22wr-mhc6 (High): the compressed manifest's declared _uncompressedDataSize is used as an allocation size before decompression, before anything in the payload is validated - a 343-byte file can claim an arbitrary size.

Fix

Cherry-picked verbatim from upstream 3.3.14 (Source/OpenEXR/IlmImf/ImfIDManifest.cpp matched the pristine 3.3.13 release exactly, so no local FreeImage divergence to reconcile):

  • Reject negative manifestEntries; grow with push_back instead of one unchecked resize().
  • Cap the declared uncompressed size by zlib's own ~1032:1 max expansion ratio relative to the actual compressed size present in the file (not a fixed constant - OpenEXR has no hard image-size limit, so a legitimately large manifest must still be allowed).

No CVE number assigned yet, GHSA-only.

Note: the separate ARM64EC SIMD guard fix (#113) is not part of this bump - that fix was never backported to the 3.3.x release branch upstream, only to main/3.4.x, so it stays a standalone patch even on top of 3.3.14.

The jump to latest (3.4.15) is real re-vendor work - new HTJ2K compressor, API changes across several headers - tracked separately, not bundled into this.

@danoli3
danoli3 force-pushed the fix/openexr-idmanifest-dos branch from f31a769 to 2c9d776 Compare September 14, 2026 14:15
@danoli3 danoli3 changed the title Fix OpenEXR IDManifest DoS: unbounded entry count and uncompressed size OpenEXR 3.3.13: IDManifest DoS (GHSA-rmgv-rm47-38g3, GHSA-5j5m-22wr-mhc6) Sep 14, 2026
The full upstream 3.3.13->3.3.14 diff is exactly two source-relevant
files: ImfIDManifest.cpp and the version header - everything else in
that release is CI manifests/CHANGES.md. So this is a real version
bump, not a partial cherry-pick.

GHSA-rmgv-rm47-38g3: manifestEntries is read straight from the
decompressed payload and passed to resize() with no bounds check - a
349-byte EXR declaring 20M entries forces ~2.9GB of resident memory,
INT_MAX entries demands 288GiB. Reject negative counts and grow the
vector with push_back instead of a single unchecked resize().

GHSA-5j5m-22wr-mhc6: the compressed manifest's declared
_uncompressedDataSize is used as an allocation size before
decompression, before anything in the payload has been validated - a
343-byte file can claim an arbitrary uncompressed size. Cap it by
zlib's own ~1032:1 max expansion ratio relative to the actual
compressed size present in the file, rather than an arbitrary
constant (OpenEXR has no fixed image-size limit, so a large legitimate
manifest must still be allowed).

Source/OpenEXR/IlmImf/ImfIDManifest.cpp matched the pristine 3.3.13
release exactly, so this is the unmodified upstream fix.

Note: the separate ARM64EC SIMD guard fix (companion PR) is NOT part
of this bump - that fix was never backported to the 3.3.x release
branch upstream, only to main/3.4.x, so it stays a standalone patch
even after this version bump.
@danoli3
danoli3 force-pushed the fix/openexr-idmanifest-dos branch from 2c9d776 to 15ed366 Compare September 15, 2026 04:43
@danoli3 danoli3 changed the title OpenEXR 3.3.13: IDManifest DoS (GHSA-rmgv-rm47-38g3, GHSA-5j5m-22wr-mhc6) OpenEXR 3.3.13 -> 3.3.14: IDManifest DoS (GHSA-rmgv-rm47-38g3, GHSA-5j5m-22wr-mhc6) Sep 15, 2026
@danoli3

danoli3 commented Sep 15, 2026

Copy link
Copy Markdown
Owner Author

Combined into #119.

@danoli3 danoli3 closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant