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
The program should exit gracefully with possibly some error information.
Actual behavior
Here is the stack trace provided by AddressSanitizer:
=================================================================
==4571==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60600000001e at pc 0x55fa640e8694 bp 0x7ffde9e59ee0 sp 0x7ffde9e59690
WRITE of size 4 at 0x60600000001e thread T0
#0 0x55fa640e8693 in __asan_memcpy /home/lain/llvm-project-llvmorg-13.0.0/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22#1 0x55fa641246c6 in b_memcpy_s /home/lain/wasm-micro-runtime/core/shared/utils/bh_common.c:95:5#2 0x55fa641b568d in wasm_loader_check_br /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:10196:13#3 0x55fa641b568d in check_branch_block /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:10284:10#4 0x55fa6419e2a7 in wasm_loader_prepare_bytecode /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:11582:31#5 0x55fa6418b3a3 in load_from_sections /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:6001:14#6 0x55fa6418eeea in load /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:6405:13#7 0x55fa6418eeea in wasm_loader_load /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:6582:10#8 0x55fa64127bda in wasm_runtime_load /home/lain/wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c:1386:12#9 0x55fa641232d6 in main /home/lain/wasm-micro-runtime/product-mini/platforms/linux/../posix/main.c:913:25#10 0x7fc3a50a2082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16#11 0x55fa6405867d in _start (/home/lain/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm+0x4367d)
0x60600000001e is located 2 bytes to the left of 64-byte region [0x606000000020,0x606000000060)
allocated by thread T0 here:
#0 0x55fa640e975d in __interceptor_malloc /home/lain/llvm-project-llvmorg-13.0.0/compiler-rt/lib/asan/asan_malloc_linux.cpp:129#1 0x55fa6418fc58 in loader_malloc /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:378:39#2 0x55fa6418fc58 in wasm_loader_ctx_init /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:8061:15#3 0x55fa6418fc58 in wasm_loader_prepare_bytecode /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:10785:24#4 0x55fa6418b3a3 in load_from_sections /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:6001:14#5 0x55fa6418eeea in load /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:6405:13#6 0x55fa6418eeea in wasm_loader_load /home/lain/wasm-micro-runtime/core/iwasm/interpreter/wasm_loader.c:6582:10#7 0x55fa64127bda in wasm_runtime_load /home/lain/wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c:1386:12#8 0x55fa641232d6 in main /home/lain/wasm-micro-runtime/product-mini/platforms/linux/../posix/main.c:913:25#9 0x7fc3a50a2082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/lain/llvm-project-llvmorg-13.0.0/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22 in __asan_memcpy
Shadow bytes around the buggy address:
0x0c0c7fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c0c7fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c0c7fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c0c7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c0c7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c0c7fff8000: fa fa fa[fa]00 00 00 00 00 00 00 00 fa fa fa fa
0x0c0c7fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0c7fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0c7fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0c7fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0c7fff8050: 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
==4571==ABORTING
The text was updated successfully, but these errors were encountered:
Subject of the issue
Running the CLI iwasm with the given testcase results in a heap buffer overflow.
Test case
iwasm-poc-01.zip
Your environment
Steps to reproduce
Expected behavior
The program should exit gracefully with possibly some error information.
Actual behavior
Here is the stack trace provided by AddressSanitizer:
The text was updated successfully, but these errors were encountered: