Skip to content

Reject oversized channelstore allocations in exrmultipart convert#2541

Merged
cary-ilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
cary-ilm:GHSA-r24r-74rc-588f
Jul 14, 2026
Merged

Reject oversized channelstore allocations in exrmultipart convert#2541
cary-ilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
cary-ilm:GHSA-r24r-74rc-588f

Conversation

@cary-ilm

Copy link
Copy Markdown
Member

The convert path computed pixel_count as int64_t but passed samplesize * pixel_count to std::vector::resize(size_type), which truncates on ILP32 and left readPixels() writing past the buffer.

Validate the size fits in size_t before resizing channelstore.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-r24r-74rc-588f

The convert path computed pixel_count as int64_t but passed
samplesize * pixel_count to std::vector::resize(size_type), which
truncates on ILP32 and left readPixels() writing past the buffer.

Validate the size fits in size_t before resizing channelstore.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-r24r-74rc-588f

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 c33a006 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