swftools icon indicating copy to clipboard operation
swftools copied to clipboard

heap-buffer-overflow exists in the function main in swfdump.c

Open SEU-SSL opened this issue 1 year ago • 0 comments

System info Ubuntu x86_64, clang 12.0.1 version: last commit 772e55a

Command line ./swfdump poc

Poc poc: poc

AddressSanitizer output ==70045==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000000b00 at pc 0x00000042e479 bp 0x7ffdfd6b5570 sp 0x7ffdfd6b4d30 READ of size 50 at 0x604000000b00 thread T0 #0 0x42e478 in strlen /home/brian/src/final/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:375:5 #1 0x4ce146 in main /home/SVF-tools/example/swftools/src/swfdump.c:1406:14 #2 0x7fb5c9dcfc86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310 #3 0x41b849 in _start (/home/SVF-tools/example/swftools/fuzz/swfdump.ci+0x41b849)

0x604000000b00 is located 0 bytes to the right of 48-byte region [0x604000000ad0,0x604000000b00) allocated by thread T0 here: #0 0x493f8d in malloc /home/brian/src/final/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3 #1 0x52b405 in rfx_alloc /home/SVF-tools/example/swftools/lib/mem.c:30:9 #2 0x52b405 in swf_ReadTag /home/SVF-tools/example/swftools/lib/rfxswf.c:1227:20

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/brian/src/final/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:375:5 in strlen Shadow bytes around the buggy address: 0x0c087fff8110: fa fa 00 00 00 00 00 04 fa fa 00 00 00 00 07 fa 0x0c087fff8120: fa fa 00 00 00 00 00 03 fa fa 00 00 00 00 00 05 0x0c087fff8130: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 03 fa 0x0c087fff8140: fa fa 00 00 00 00 00 07 fa fa 00 00 00 00 00 fa 0x0c087fff8150: fa fa 00 00 00 00 03 fa fa fa 00 00 00 00 00 00 =>0x0c087fff8160:[fa]fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 01 0x0c087fff8170: fa fa 00 00 00 00 02 fa fa fa 00 00 00 00 01 fa 0x0c087fff8180: fa fa 00 00 00 00 03 fa fa fa 00 00 00 00 02 fa 0x0c087fff8190: fa fa 00 00 00 00 00 03 fa fa 00 00 00 00 04 fa 0x0c087fff81a0: fa fa 00 00 00 00 00 06 fa fa 00 00 00 00 04 fa 0x0c087fff81b0: fa fa 00 00 00 00 02 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 ==70045==ABORTING

SEU-SSL avatar May 16 '23 03:05 SEU-SSL