Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of bounds heap read in perform_disassembly #2853

Closed
hannob opened this issue Jun 28, 2015 · 1 comment
Closed

Out of bounds heap read in perform_disassembly #2853

hannob opened this issue Jun 28, 2015 · 1 comment
Labels

Comments

@hannob
Copy link

hannob commented Jun 28, 2015

Script:
https://crashes.fuzzing-project.org/radare2-script-oob-heap-read-perform_disassembly
Contains string "pD@!"

Address Sanitizer:

==6312==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000016550 at pc 0x7fcdf1deb214 bp 0x7ffde4e8af80 sp 0x7ffde4e8af70
READ of size 4 at 0x602000016550 thread T0
    #0 0x7fcdf1deb213 in perform_disassembly /f/radare2/radare2/libr/core/disasm.c:1076
    #1 0x7fcdf1e0413f in r_core_print_disasm /f/radare2/radare2/libr/core/disasm.c:2267
    #2 0x7fcdf1c9f8f5 in cmd_print /f/radare2/radare2/libr/core/cmd_print.c:2142
    #3 0x7fcdf1d01462 in r_core_cmd_subst_i /f/radare2/radare2/libr/core/cmd.c:1574
    #4 0x7fcdf1c63499 in r_core_cmd_subst /f/radare2/radare2/libr/core/cmd.c:1081
    #5 0x7fcdf1c64633 in r_core_cmd /f/radare2/radare2/libr/core/cmd.c:1943
    #6 0x7fcdf1c674ec in r_core_cmd_lines /f/radare2/radare2/libr/core/cmd.c:1994
    #7 0x7fcdf1c676f4 in r_core_cmd_file /f/radare2/radare2/libr/core/cmd.c:2006
    #8 0x7fcdf1c6a496 in r_core_run_script /f/radare2/radare2/libr/core/cmd.c:373
    #9 0x4054e3 in main /f/radare2/radare2/binr/radare2/radare2.c:729
    #10 0x7fcdec1c5f9f in __libc_start_main (/lib64/libc.so.6+0x1ff9f)
    #11 0x409fae (/mnt/ram/r2/radare2+0x409fae)

0x602000016551 is located 0 bytes to the right of 1-byte region [0x602000016550,0x602000016551)
allocated by thread T0 here:
    #0 0x7fcdf23926f7 in malloc (/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/libasan.so.1+0x576f7)
    #1 0x7fcdf1c9f832 in cmd_print /f/radare2/radare2/libr/core/cmd_print.c:2136

SUMMARY: AddressSanitizer: heap-buffer-overflow /f/radare2/radare2/libr/core/disasm.c:1076 perform_disassembly
Shadow bytes around the buggy address:
  0x0c047fffac50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fffac60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fffac70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fffac80: fa fa fa fa fa fa fd fa fa fa fd fd fa fa 00 02
  0x0c047fffac90: fa fa 00 02 fa fa 00 02 fa fa fd fa fa fa fd fa
=>0x0c047fffaca0: fa fa fd fa fa fa 03 fa fa fa[01]fa fa fa 04 fa
  0x0c047fffacb0: fa fa 01 fa fa fa 04 fa fa fa 02 fa fa fa 01 fa
  0x0c047fffacc0: fa fa 05 fa fa fa 05 fa fa fa 05 fa fa fa fd fd
  0x0c047fffacd0: fa fa fd fd fa fa fd fa fa fa fd fd fa fa 06 fa
  0x0c047ffface0: fa fa fd fa fa fa 05 fa fa fa fd fa fa fa 06 fa
  0x0c047fffacf0: fa fa fd fa fa fa 06 fa fa fa 03 fa fa fa fd 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
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Contiguous container OOB:fc
  ASan internal:           fe
==6312==ABORTING
@alvarofe
Copy link
Contributor

Also fixed in #2856. Wait to be merged to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants