Skip to content

Fix exrmultiview heap OOB when union dataWindow misaligns with subsampling#2530

Merged
cary-ilm merged 3 commits into
AcademySoftwareFoundation:mainfrom
cary-ilm:GHSA-gjf7-wjjw-xq56.2
Jul 13, 2026
Merged

Fix exrmultiview heap OOB when union dataWindow misaligns with subsampling#2530
cary-ilm merged 3 commits into
AcademySoftwareFoundation:mainfrom
cary-ilm:GHSA-gjf7-wjjw-xq56.2

Conversation

@cary-ilm

@cary-ilm cary-ilm commented Jul 6, 2026

Copy link
Copy Markdown
Member

Validate the combined data window against each input channel's x/y subsampling before allocating pixel buffers or calling readPixels, matching ImfHeader checks. Reject misaligned unions with ArgExc instead of reading past undersized buffers.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-gjf7-wjjw-xq56

@cary-ilm cary-ilm changed the title Fix exrmultiview heap OOB when union dataWindow misaligns with subsam… Fix exrmultiview heap OOB when union dataWindow misaligns with subsampling Jul 6, 2026
@peterhillman

Copy link
Copy Markdown
Collaborator

I wonder if a better "fix" would be to prevent exrmultiview supporting sampling!=1 regardless of the data window.
That would simplify the code and make it easier for users to understand the problem. Subsampled files are uncommon, and exrmultiview won't see a huge amount of use either.

cary-ilm and others added 2 commits July 9, 2026 09:59
…pling

Validate the combined data window against each input channel's x/y
subsampling before allocating pixel buffers or calling readPixels,
matching ImfHeader checks. Reject misaligned unions with ArgExc instead
of reading past undersized buffers.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-gjf7-wjjw-xq56

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Cary Phillips <cary@ilm.com>
Subsampling is rare, and exrmultiview not commonly used, so this
solution seems cleaner: just don't handle subsampling at all.

Signed-off-by: Cary Phillips <cary@ilm.com>
@cary-ilm
cary-ilm force-pushed the GHSA-gjf7-wjjw-xq56.2 branch from e28268c to bad9905 Compare July 9, 2026 17:00
@cary-ilm

cary-ilm commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@peterhillman, I took your suggestion and added a condition to reject any input with non-default sampling.

@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 1dd2da1 into AcademySoftwareFoundation:main Jul 13, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants