Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can β€” learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company πŸ‘‡

2.9 KB
Raw Blame
=================================================================
==53771==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7b336ed00028 at pc 0x55b61e3e1fd9 bp 0x7fff9bd16890 sp 0x7fff9bd16060
WRITE of size 40 at 0x7b336ed00028 thread T0
    #0 0x55b61e3e1fd8  (/work/target/doc07lab/asanlab+0xcdfd8) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)
    #1 0x55b61e428b70  (/work/target/doc07lab/asanlab+0x114b70) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)
    #2 0x55b61e4288a0  (/work/target/doc07lab/asanlab+0x1148a0) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)
    #3 0x7f3370f2f1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)
    #4 0x7f3370f2f28a  (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)
    #5 0x55b61e340354  (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)

Address 0x7b336ed00028 is located in stack of thread T0 at offset 40 in frame
    #0 0x55b61e428abf  (/work/target/doc07lab/asanlab+0x114abf) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)

  This frame has 1 object(s):
    [32, 40) 'buf' (line 27) <== Memory access at offset 40 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 (/work/target/doc07lab/asanlab+0xcdfd8) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7) 
Shadow bytes around the buggy address:
  0x7b336ecffd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ecffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ecffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ecfff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ecfff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x7b336ed00000: f1 f1 f1 f1 00[f3]f3 f3 00 00 00 00 00 00 00 00
  0x7b336ed00080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ed00100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ed00180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ed00200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7b336ed00280: 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
==53771==ABORTING