Skip to content
New issue

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

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

Already on GitHub? # to your account

out of bounds heap read in perform_disassebly #2872

Closed
hannob opened this issue Jul 1, 2015 · 0 comments
Closed

out of bounds heap read in perform_disassebly #2872

hannob opened this issue Jul 1, 2015 · 0 comments

Comments

@hannob
Copy link

hannob commented Jul 1, 2015

Script:
https://crashes.fuzzing-project.org/radare2-script-oob-heap-read-perform_disassembly-2
Different from #2853

Contains command "pD@!0"

Address Sanitizer:

=================================================================
==26190==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000015e30 at pc 0x7fada1fa5a01 bp 0x7ffc10522530 sp 0x7ffc10522520
READ of size 4 at 0x602000015e30 thread T0
    #0 0x7fada1fa5a00 in perform_disassembly /f/radare2/radare2/libr/core/disasm.c:1076
    #1 0x7fada1fbed07 in r_core_print_disasm /f/radare2/radare2/libr/core/disasm.c:2270
    #2 0x7fada1e5676c in cmd_print /f/radare2/radare2/libr/core/cmd_print.c:2143
    #3 0x7fada1eb9eee in r_core_cmd_subst_i /f/radare2/radare2/libr/core/cmd.c:1578
    #4 0x7fada1e199ac in r_core_cmd_subst /f/radare2/radare2/libr/core/cmd.c:1084
    #5 0x7fada1e1ab53 in r_core_cmd /f/radare2/radare2/libr/core/cmd.c:1947
    #6 0x7fada1e1da7c in r_core_cmd_lines /f/radare2/radare2/libr/core/cmd.c:1998
    #7 0x7fada1e1dcb4 in r_core_cmd_file /f/radare2/radare2/libr/core/cmd.c:2010
    #8 0x7fada1e209ee in r_core_run_script /f/radare2/radare2/libr/core/cmd.c:373
    #9 0x405236 in main /f/radare2/radare2/binr/radare2/radare2.c:729
    #10 0x7fad9c377f9f in __libc_start_main (/lib64/libc.so.6+0x1ff9f)
    #11 0x409e6d (/mnt/ram/r2/radare2+0x409e6d)

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

SUMMARY: AddressSanitizer: heap-buffer-overflow /f/radare2/radare2/libr/core/disasm.c:1076 perform_disassembly
Shadow bytes around the buggy address:
  0x0c047fffab70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fffab80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fffab90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fffaba0: fa fa fd fa fa fa fd fd fa fa 00 02 fa fa 00 02
  0x0c047fffabb0: fa fa 00 02 fa fa fd fa fa fa fd fa fa fa fd fa
=>0x0c047fffabc0: fa fa 03 fa fa fa[01]fa fa fa 04 fa fa fa 01 fa
  0x0c047fffabd0: fa fa 04 fa fa fa 02 fa fa fa 01 fa fa fa 06 fa
  0x0c047fffabe0: fa fa 06 fa fa fa 06 fa fa fa fd fd fa fa fd fd
  0x0c047fffabf0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
  0x0c047fffac00: fa fa fd fa fa fa fd fa fa fa fd fd fa fa 02 fa
  0x0c047fffac10: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fd
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
==26190==ABORTING
@alvarofe alvarofe self-assigned this Jul 1, 2015
@crowell crowell closed this as completed Jul 1, 2015
crowell added a commit that referenced this issue Jul 1, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants