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

Undefined-shift in de265_image::set_nonzero_coefficient #465

Open
bobfriesenhahn opened this issue Dec 25, 2024 · 0 comments
Open

Undefined-shift in de265_image::set_nonzero_coefficient #465

bobfriesenhahn opened this issue Dec 25, 2024 · 0 comments

Comments

@bobfriesenhahn
Copy link

Oss-fuzz testing of GraphicsMagick has resulted in oss-fuzz report 384182501. The set_nonzero_coefficient() inline function fails to assure that 'log2TrafoSize - tu_info.log2unitSize' is a positive value. For the provided test-case, the left shift request is -1. The computed value 'width' is used as one of the controlling values in two loops, so this may result in a security issue if the loops run for a very long time, or if the computed 'tu_info' array index is out of bounds. Since the result is "undefined behavior", the behavior may depend on the compiler and compilation options used.

This is the POC test-case that oss-fuzz produced (extension changed to allow upload):

clusterfuzz-testcase-minimized-coder_HEIF_fuzzer-5118858410655744 heif

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

No branches or pull requests

1 participant