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
[INFO] Start to read j2k main header (0).
[INFO] Main header has been correctly decoded.
[INFO] No decoded area parameters, set the decoded area to the whole image
[WARNING] Tile part length size inconsistent with stream length
[INFO] Stream reached its end !
[INFO] Header of tile 1 / 1 has been read.
[WARNING] read: segment too long (2457728) with max (3) for codeblock 3 (p=0, b=0, r=0, c=0)
=================================================================
==18975==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000026b at pc 0x7f0b6a246267 bp 0x7ffc259fd670 sp 0x7ffc259fd660
READ of size 2 at 0x60200000026b thread T0
#0 0x7f0b6a246266 in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#1 0x7f0b6a246266 in opj_mqc_init_dec_common /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/mqc.c:434
#2 0x7f0b6a246266 in opj_mqc_init_dec /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/mqc.c:447
#3 0x7f0b6a2814a1 in opj_t1_decode_cblk /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/t1.c:2067
#4 0x7f0b6a2814a1 in opj_t1_clbl_decode_processor /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/t1.c:1703
#5 0x7f0b6a1dd619 in opj_thread_pool_submit_job /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/thread.c:835
#6 0x7f0b6a28a79e in opj_t1_decode_cblks /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/t1.c:1942
#7 0x7f0b6a294e5f in opj_tcd_t1_decode /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/tcd.c:2068
#8 0x7f0b6a294e5f in opj_tcd_decode_tile /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/tcd.c:1722
#9 0x7f0b6a230b4b in opj_j2k_decode_tile /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/j2k.c:9900
#10 0x7f0b6a2312d2 in opj_j2k_decode_tiles /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/j2k.c:11755
#11 0x7f0b6a236ea2 in opj_j2k_exec /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/j2k.c:9039
#12 0x7f0b6a236ea2 in opj_j2k_decode /mnt/f/fuzz/openjpeg/openjpeg/src/lib/openjp2/j2k.c:12058
#13 0x559e6b3acc5a in main /mnt/f/fuzz/openjpeg/openjpeg/src/bin/jp2/opj_decompress.c:1585
#14 0x7f0b69e61082 in __libc_start_main ../csu/libc-start.c:308
#15 0x559e6b3af04d in _start (/mnt/f/fuzz/openjpeg/openjpeg/asanbuild/bin/opj_decompress+0xc04d)
Address 0x60200000026b is a wild pointer.
SUMMARY: AddressSanitizer: heap-buffer-overflow /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34 in memcpy
Shadow bytes around the buggy address:
0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 fa
0x0c047fff8010: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
0x0c047fff8020: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
0x0c047fff8030: fa fa 00 00 fa fa fd fd fa fa 00 00 fa fa 00 00
=>0x0c047fff8040: fa fa fd fa fa fa 03 fa fa fa fa fa fa[fa]fa fa
0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==18975==ABORTING
The text was updated successfully, but these errors were encountered:
This is similar testcase to #1533 but that didn't fix it.
Not sure about the root cause here.
POC: ./opj_decompress -allow-partial -i poc1.j2k -o ttt.png
The text was updated successfully, but these errors were encountered: