hi, i found something unusual in this repo, are they new bugs ?
To reproduce the crash please use command: ./png_demo @@ /dev/null (replace @@ to the sample's path)
==22802==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000011 at pc 0x00000043b61c bp 0x7ffefb2a1690 sp 0x7ffefb2a0e40
READ of size 40 at 0x602000000011 thread T0
#0 0x43b61b in __interceptor_fwrite.part.57 /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1143
#1 0x4f491a in SaveBMP(char*, unsigned char*, unsigned char*, int, int, int) /home/bupt/Desktop/PNGdec/linux/main.cpp:89:13
#2 0x4f5311 in main /home/bupt/Desktop/PNGdec/linux/main.cpp:144:9
#3 0x7f0ed9adfc86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
#4 0x41c129 in _start (/home/bupt/Desktop/PNGdec/linux/png_demo+0x41c129)
0x602000000011 is located 0 bytes to the right of 1-byte region [0x602000000010,0x602000000011)
allocated by thread T0 here:
#0 0x4ae6f0 in malloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
#1 0x4f51ec in main /home/bupt/Desktop/PNGdec/linux/main.cpp:128:34
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1143 in __interceptor_fwrite.part.57
Shadow bytes around the buggy address:
0x0c047fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c047fff8000: fa fa[01]fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8040: fa fa fa fa fa fa fa 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
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
==22802==ABORTING
==22853==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6220000017b0 at pc 0x0000004ad554 bp 0x7ffc9c610730 sp 0x7ffc9c60fee0
WRITE of size 132 at 0x6220000017b0 thread T0
#0 0x4ad553 in __asan_memcpy /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22
#1 0x4fc310 in DecodePNG(png_image_tag*, void*, int) /home/bupt/Desktop/PNGdec/linux/../src/png.inl:801:33
#2 0x4fc310 in PNG::decode(void*, int) /home/bupt/Desktop/PNGdec/linux/../src/PNGdec.cpp:194:12
#3 0x4f5207 in main /home/bupt/Desktop/PNGdec/linux/main.cpp:129:18
#4 0x7f6fa7b19c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
#5 0x41c129 in _start (/home/bupt/Desktop/PNGdec/linux/png_demo+0x41c129)
0x6220000017b0 is located 0 bytes to the right of 5808-byte region [0x622000000100,0x6220000017b0)
allocated by thread T0 here:
#0 0x4ae6f0 in malloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
#1 0x4f51ec in main /home/bupt/Desktop/PNGdec/linux/main.cpp:128:34
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22 in __asan_memcpy
Shadow bytes around the buggy address:
0x0c447fff82a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff82b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff82c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff82d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff82e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c447fff82f0: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
0x0c447fff8300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff8310: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff8320: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff8330: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff8340: 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
==22853==ABORTING
==23090==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7fad078fceb2 at pc 0x0000004f4e69 bp 0x7ffe0c9898b0 sp 0x7ffe0c9898a8
READ of size 1 at 0x7fad078fceb2 thread T0
#0 0x4f4e68 in SaveBMP(char*, unsigned char*, unsigned char*, int, int, int) /home/bupt/Desktop/PNGdec/linux/main.cpp:84:24
#1 0x4f5311 in main /home/bupt/Desktop/PNGdec/linux/main.cpp:144:9
#2 0x7fad0ae1dc86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
#3 0x41c129 in _start (/home/bupt/Desktop/PNGdec/linux/png_demo+0x41c129)
0x7fad078fceb2 is located 2 bytes to the right of 2013271728-byte region [0x7fac8f8fb800,0x7fad078fceb0)
allocated by thread T0 here:
#0 0x4ae6f0 in malloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
#1 0x4f51ec in main /home/bupt/Desktop/PNGdec/linux/main.cpp:128:34
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/bupt/Desktop/PNGdec/linux/main.cpp:84:24 in SaveBMP(char*, unsigned char*, unsigned char*, int, int, int)
Shadow bytes around the buggy address:
0x0ff620f17980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff620f17990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff620f179a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff620f179b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff620f179c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0ff620f179d0: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
0x0ff620f179e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0ff620f179f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0ff620f17a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0ff620f17a10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0ff620f17a20: 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
==23090==ABORTING
==22984==ERROR: AddressSanitizer: requested allocation size 0xffffffff837c16b0 (0xffffffff837c26b0 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0)
#0 0x4ae6f0 in malloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
#1 0x4f51ec in main /home/bupt/Desktop/PNGdec/linux/main.cpp:128:34
==22984==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: allocation-size-too-big /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 in malloc
==22984==ABORTING
The text was updated successfully, but these errors were encountered:
hi, i found something unusual in this repo, are they new bugs ?
To reproduce the crash please use command:
./png_demo @@ /dev/null (replace @@ to the sample's path)FPE
crash sample
id0-FPE-sample1.zip
crash info
heap-buffer-overflow
crash sample No.1
id1-heap-buffer-overflow-sample1.zip
crash info of sample No.1
crash sample No.2
id2-heap-buffer-overflow-sample2.zip
crash info of sample No.2
crash sample No.3
id8-heap-buffer-overflow-sample3.zip
crash info of sample No.3
stack-buffer-overflow
crash sample No.1
id12-stack-buffer-overflow-sample1.zip
crash info of sample No.1
global-buffer-overflow
crash sample
id13-global-buffer-overflow-sample1.zip
crash info of the sample
memory allocation problem
crash sample No.1
id5-memory-allocation-problem-sample1.zip
crash info of sample No.1
The text was updated successfully, but these errors were encountered: