You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We found an integer-overflow in function opj_dwt_decode_partial_1_parallel() from dwt.c after testing one of the harnesses provided on the OSS-Fuzz repository (opj_decompress_fuzzer_J2K).
The program performs a series of mathematical operations and bitwise shifts before storing the result in a variable of type “OPJ_INT32”, but there are no checks related to possible overflows/underflows of such operations.
It’s important to notice that the bug is not consistent, i.e. it is not always triggered given the same input, and we think that this may be due to offset approximations as the bug is triggered by the operation OPJ_D__off(i,off).
We cannot provide more info on which is the cause for this error, but we are confident that developers with knowledge on the codebase will be able to find the root of the issue with little effort and remain available to assist you in case of need.
To reproduce the error, simply run the binary against the provided input, using a command as ./opj_decompress_fuzzer_J2K /path_to_testcases/input.
The program has been tested on the standard Docker image provided on OSS-Fuzz using Ubuntu 20.04, providing AFL++ as fuzzing engine and build flag --sanitizer=undefined.
Operating system
Ubuntu 20.04 (x86_64)
openjpeg version
Commit hash 606304d
The text was updated successfully, but these errors were encountered:
skorpion98
changed the title
Integer-overflow in function opj_dwt_decode_partial_1_parallel()
Integer-overflow in function opj_dwt_decode_partial_1_parallel()Sep 4, 2024
Summary
We found an integer-overflow in function
opj_dwt_decode_partial_1_parallel()
fromdwt.c
after testing one of the harnesses provided on the OSS-Fuzz repository (opj_decompress_fuzzer_J2K).openjpeg/src/lib/openjp2/dwt.c
Line 2404 in 606304d
Expected behavior and actual behavior.
The program performs a series of mathematical operations and bitwise shifts before storing the result in a variable of type “OPJ_INT32”, but there are no checks related to possible overflows/underflows of such operations.
It’s important to notice that the bug is not consistent, i.e. it is not always triggered given the same input, and we think that this may be due to offset approximations as the bug is triggered by the operation
OPJ_D__off(i,off)
.We cannot provide more info on which is the cause for this error, but we are confident that developers with knowledge on the codebase will be able to find the root of the issue with little effort and remain available to assist you in case of need.
Steps to reproduce the problem.
In the attached archive you will find:
To reproduce the error, simply run the binary against the provided input, using a command as
./opj_decompress_fuzzer_J2K /path_to_testcases/input
.The program has been tested on the standard Docker image provided on OSS-Fuzz using Ubuntu 20.04, providing AFL++ as fuzzing engine and build flag
--sanitizer=undefined
.Operating system
Ubuntu 20.04 (x86_64)
openjpeg version
Commit hash
606304d
The text was updated successfully, but these errors were encountered: