Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify data size in deepscanlines which are not compressed #1037

Conversation

peterhillman
Copy link
Contributor

Fixes #1033

If deep scanline data is not compressed, the input buffer size is read from file, and could be too small for the required data, causing a read buffer overrun when uncompressing data. When data is compressed, a sufficiently large buffer will always be allocated by the decompressor, so read bytes will always be valid.

Note: Other image types (regular images and deep tiles) may also have similar issues.

Signed-off-by: Peter Hillman peterh@wetafx.co.nz

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Copy link
Member

@cary-ilm cary-ilm left a comment

Choose a reason for hiding this comment

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

LGTM

@cary-ilm cary-ilm merged commit 566f524 into AcademySoftwareFoundation:master Jun 3, 2021
peterhillman added a commit to peterhillman/openexr that referenced this pull request Jun 4, 2021
@peterhillman peterhillman mentioned this pull request Jun 4, 2021
cary-ilm pushed a commit that referenced this pull request Jun 9, 2021
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Jun 23, 2021
cary-ilm pushed a commit that referenced this pull request Jun 30, 2021
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
@cary-ilm cary-ilm added the v3.0.5 label Sep 2, 2021
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.

heap-buffer-overflow in Imf_3_1::CharPtrIO::readChars
2 participants