================================================================= ==23936==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x77022df000bf at pc 0x5eb2e9eef73e bp 0x7fff21f1a690 sp 0x7fff21f1a680 WRITE of size 1 at 0x77022df000bf thread T0 #0 0x5eb2e9eef73d in main /media/sf_fuzz/main.c:9 #1 0x77022fe2a1c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #2 0x77022fe2a28a in __libc_start_main_impl ../csu/libc-start.c:360 #3 0x5eb2e9eef854 in _start (/home/zlsf/fuzz/test+0x1854) (BuildId: 0e27121e088773996fbdd361c828ca743ab26090)
Address 0x77022df000bf is located in stack of thread T0 at offset 191 in frame #0 0x5eb2e9eef2ff in main /media/sf_fuzz/main.c:4
This frame has 3 object(s): [48, 52) 'a' (line 5) [64, 68) 'idx' (line 5) [80, 180) 'buf' (line 6) <== Memory access at offset 191 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow /media/sf_fuzz/main.c:9 in main Shadow bytes around the buggy address: 0x77022deffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022deffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022defff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022defff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022df00000: f1 f1 f1 f1 f1 f1 04 f2 04 f2 00 00 00 00 00 00 =>0x77022df00080: 00 00 00 00 00 00 04[f3]f3 f3 f3 f3 00 00 00 00 0x77022df00100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022df00180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022df00200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022df00280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x77022df00300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 ==23936==ABORTING