Skip to content

Reject oversized exrmetrics vector allocations on ILP32#2539

Merged
cary-ilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
cary-ilm:fix-exrmetrics-ilp32
Jul 14, 2026
Merged

Reject oversized exrmetrics vector allocations on ILP32#2539
cary-ilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
cary-ilm:fix-exrmetrics-ilp32

Conversation

@cary-ilm

Copy link
Copy Markdown
Member

exrmetrics computed image buffer sizes as uint64_t but passed them to std::vector::resize(size_type), which silently truncates on 32-bit builds and left decode writing past undersized channel and sample-count buffers.

Validate count and size to confirm the cast to size_t does not overflow.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-r8mj-rhfc-38g4
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-pgc2-hppj-q623
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-g5m8-8w79-34q8 Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-xc77-xm9h-qxm4

exrmetrics computed image buffer sizes as uint64_t but passed them to
std::vector::resize(size_type), which silently truncates on 32-bit
builds and left decode writing past undersized channel and sample-count
buffers.

Validate count and size to confirm the cast to size_t does not overflow.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-r8mj-rhfc-38g4
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-pgc2-hppj-q623
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-g5m8-8w79-34q8
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-xc77-xm9h-qxm4

Signed-off-by: Cary Phillips <cary@ilm.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@peterhillman peterhillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@cary-ilm
cary-ilm merged commit 55888db into AcademySoftwareFoundation:main Jul 14, 2026
45 checks passed
@cary-ilm cary-ilm added the v3.4 label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants