Skip to content

Reject DWA RLE streams shorter than required channel data#2544

Closed
cary-ilm wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
cary-ilm:fix-GHSA-wwx8-2v36-rhr8
Closed

Reject DWA RLE streams shorter than required channel data#2544
cary-ilm wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
cary-ilm:fix-GHSA-wwx8-2v36-rhr8

Conversation

@cary-ilm

Copy link
Copy Markdown
Member

A malformed DWAA/DWAB chunk can declare RLE_RAW_SIZE smaller than the byte count needed by RLE-classified channels. The decoder only rejected sizes larger than the planar buffer, so the RLE expander filled fewer raw bytes than the channel reconstruction consumed and stale heap contents were copied into caller-visible pixel output.

After classifying channels, sum each RLE channel's planarUncSize and reject the chunk when RLE_RAW_SIZE is smaller than that total or when RLE data is required but no compressed RLE stream is present. Also reject non-zero RLE stream sizes when no channels require RLE data.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-wwx8-2v36-rhr8

A malformed DWAA/DWAB chunk can declare RLE_RAW_SIZE smaller than the
byte count needed by RLE-classified channels. The decoder only rejected
sizes larger than the planar buffer, so the RLE expander filled fewer
raw bytes than the channel reconstruction consumed and stale heap
contents were copied into caller-visible pixel output.

After classifying channels, sum each RLE channel's planarUncSize and
reject the chunk when RLE_RAW_SIZE is smaller than that total or when
RLE data is required but no compressed RLE stream is present. Also
reject non-zero RLE stream sizes when no channels require RLE data.

Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-wwx8-2v36-rhr8

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

Copy link
Copy Markdown
Member Author

got a better idea

@cary-ilm cary-ilm closed this Jul 11, 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