Skip to content

Reject NULL preview rgba data in exr_attr_set_preview()#2469

Open
cary-ilm wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
cary-ilm:GHSA-29q6-4p2c-77qq
Open

Reject NULL preview rgba data in exr_attr_set_preview()#2469
cary-ilm wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
cary-ilm:GHSA-29q6-4p2c-77qq

Conversation

@cary-ilm

@cary-ilm cary-ilm commented Jun 12, 2026

Copy link
Copy Markdown
Member

Validate the source rgba pointer before memcpy in exr_attr_preview_create() and the same-dimensions update path in exr_attr_set_preview(), preventing a NULL pointer dereference when nonzero preview dimensions are supplied without pixel data.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-29q6-4p2c-77qq

Validate the source rgba pointer before memcpy in
exr_attr_preview_create() and the same-dimensions update path in
exr_attr_set_preview(), preventing a NULL pointer dereference when
nonzero preview dimensions are supplied without pixel data.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Cary Phillips <cary@ilm.com>
@cary-ilm cary-ilm requested a review from peterhillman June 12, 2026 13:29

@kthurston kthurston left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FYI: I think that this is the similar to the 0 channel list size issue #2473 - the older code allowed a w or h of 0, with the difference being that this is continuing to handle a 0 size - but if a 0 size should be invalid, we should probably just test the pointer and then change the code in init to fail on w or h == 0

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.

2 participants