Menu

#24 global-buffer-overflow in function proc_sym

1.09
open
nobody
None
5
2021-04-06
2021-04-06
chiba taiki
No

Hi,

While fuzzing ATasm 1.09, I found a global-buffer-overflow in function proc_sym() in asm.c

==3788534==ERROR: AddressSanitizer: global-buffer-overflow on address 0x557bb0adbec4 at pc 0x557bb0a8ec41 bp 0x7ffc28e17780 sp 0x7ffc28e17770
READ of size 1 at 0x557bb0adbec4 thread T0
    #0 0x557bb0a8ec40 in proc_sym /home/atasm/asm.c:1559
    #1 0x557bb0a8ff4a in do_cmd /home/atasm/asm.c:1995
    #2 0x557bb0a90424 in assemble /home/atasm/asm.c:2034
    #3 0x557bb0a6e341 in main /home/atasm/asm.c:2446
    #4 0x7fbba76cb0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #5 0x557bb0a6fddd in _start (/home/atasm/atasm+0xdddd)

Address 0x557bb0adbec4 is a wild pointer.
SUMMARY: AddressSanitizer: global-buffer-overflow /home/atasm/src/asm.c:1559 in proc_sym
Shadow bytes around the buggy address:
  0x0aaff6153780: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff6153790: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff61537a0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff61537b0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff61537c0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
=>0x0aaff61537d0: f9 f9 f9 f9 f9 f9 f9 f9[f9]f9 f9 f9 f9 f9 f9 f9
  0x0aaff61537e0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff61537f0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff6153800: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff6153810: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0aaff6153820: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
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
==3788534==ABORTING

reproduce

atasm global-buffer-overflow-01-proc_sym
1 Attachments

Discussion


Log in to post a comment.