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

Crash when e asm.reloff=true #10757

Closed
cyanpencil opened this issue Jul 17, 2018 · 6 comments
Closed

Crash when e asm.reloff=true #10757

cyanpencil opened this issue Jul 17, 2018 · 6 comments

Comments

@cyanpencil
Copy link
Contributor

cyanpencil commented Jul 17, 2018

To reproduce:
r2 /bin/ls -A -c "s main; e asm.reloff=1; pd 1"

ASAN:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==9109==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000001d (pc 0x7f45cf991ad2 bp 0x7ffcbe5890b0 sp 0x7ffcbe5887d8 T0)
==9109==The signal is caused by a READ memory access.
==9109==Hint: address points to the zero page.
    #0 0x7f45cf991ad1 in __sanitizer::internal_strlen(char const*) /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_libc.cc:171
    #1 0x7f45cf8d278d in printf_common /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc:544
    #2 0x7f45cf8d41ad in __interceptor_vsnprintf /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1509
    #3 0x7f45ce934d05 in r_cons_printf_list /home/luca/radare2/libr/cons/cons.c:893
    #4 0x7f45ce935084 in r_cons_printf /home/luca/radare2/libr/cons/cons.c:915
    #5 0x7f45cf30d27f in r_print_offset_sg /home/luca/radare2/libr/core/cmd_print.c:5731
    #6 0x7f45cf447040 in ds_print_offset /home/luca/radare2/libr/core/disasm.c:2425
    #7 0x7f45cf45c2e0 in r_core_print_disasm /home/luca/radare2/libr/core/disasm.c:4754
    #8 0x7f45cf303ad4 in cmd_print /home/luca/radare2/libr/core/cmd_print.c:4481
    #9 0x7f45cf3e7d28 in r_cmd_call /home/luca/radare2/libr/core/cmd_api.c:237
    #10 0x7f45cf344b9c in r_core_cmd_subst_i /home/luca/radare2/libr/core/cmd.c:2863
    #11 0x7f45cf33d893 in r_core_cmd_subst /home/luca/radare2/libr/core/cmd.c:1892
    #12 0x7f45cf34a028 in r_core_cmd /home/luca/radare2/libr/core/cmd.c:3567
    #13 0x7f45cf207b44 in r_core_prompt_exec /home/luca/radare2/libr/core/core.c:2438
    #14 0x564798a3bf1b in main /home/luca/radare2/binr/radare2/radare2.c:1373
    #15 0x7f45c94c206a in __libc_start_main (/usr/lib/libc.so.6+0x2306a)
    #16 0x564798a34fc9 in _start (/home/luca/radare2/binr/radare2/radare2+0x6fc9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_libc.cc:171 in __sanitizer::internal_strlen(char const*)
==9109==ABORTING
@cyanpencil cyanpencil changed the title Crash when e.reloff=true Crash when e asm.reloff=true Jul 17, 2018
@radare
Copy link
Collaborator

radare commented Jul 17, 2018 via email

@cyanpencil
Copy link
Contributor Author

I made a full sys/install, I'm sure I'm on latest master...
can you try to pd 10 or scroll up and down in visual disasm? It still crashes to me

If it helps, here is my /bin/ls:
ls.zip

to start with, passing filename BEFORE the flags is an anti-pattern imposed by GNU. dont do that, its not portable. it doesnst works on Mac or BSD systems.

Didn't know that... glad that at least I learnt something for this! Thanks for the tip

@radare
Copy link
Collaborator

radare commented Jul 17, 2018 via email

@cyanpencil
Copy link
Contributor Author

I tried with make purge and then sys/install, but to no avail, still crashes.

I tried a fresh install on a lubuntu virtual machine, still crashes :(

But anyway if u run sys/asan.sh you can get a proper crahlog

The log I posted before is what ASAN gave me

NOTE: it crashes only if the binary is analized with aa and then disasm is printed.

@radare radare closed this as completed in 8069925 Jul 17, 2018
@radare
Copy link
Collaborator

radare commented Jul 17, 2018

the foramt string in that line was wrong. i just fixed it, pls confirm if you can repro the crash now

@cyanpencil
Copy link
Contributor Author

Yes, it is fixed now. Thanks!

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

No branches or pull requests

2 participants