-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Error while debugging a MIPS binary remotely #16680
Comments
this is not master. it's like 1 week old
can you please confirm the bug is still in master? because the errror line doesnt matches the source
… On 22 Apr 2020, at 08:18, Aswin C ***@***.***> wrote:
Work environment
Questions Answers
OS/arch/bits (mandatory) Ubuntu 18.04.4 LTS, 64 bit
File format of the file you reverse (mandatory) ELF
Architecture/bits of the file (mandatory) MIPS
r2 -v full output, not truncated (mandatory) radare2 4.5.0-git 24411 @ linux-x86-64 git.4.4.0-23-gf549eb2a2 commit: f549eb2 <f549eb2> build: 2020-04-17__07:55:34
I've opened up a MIPS binary on QEMU :
sudo chroot . ./qemu-mipsel-static -g 1337 ./pwnable/Intro/stack_bof_01 testinput123
I'm trying to debug it:
r2 -a mips -d -B 0x400630 gdb://127.0.0.1:1337 pwnable/Intro/stack_bof_01
Expected behavior
To be able to debug the binary remotely.
Actual behavior
It results in:
free(): invalid next size (fast)
Aborted (core dumped)
Steps to reproduce the behavior
By enabling debug mode
Additional Logs, screenshots, source-code, configuration dump, ...
Backtrace:
#1 0x00007ffff72c0801 in __GI_abort () at abort.c:79
#2 0x00007ffff7309897 in __libc_message ***@***.***=do_abort, ***@***.***=0x7ffff7436b9a "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007ffff731090a in malloc_printerr ***@***.***=0x7ffff7438800 "free(): invalid next size (fast)") at malloc.c:5350
#4 0x00007ffff7317f60 in _int_free (have_lock=0, p=0x55555585e900, av=0x7ffff766bc40 <main_arena>) at malloc.c:4213
#5 __GI___libc_free (mem=0x55555585e910) at malloc.c:3124
#6 0x00007ffff78f8528 in r_list_delete (list=0x55555585df00, iter=0x555555861c30) at list.c:106
#7 0x00007ffff78f8392 in r_list_purge (list=0x55555585df00) at list.c:72
#8 0x00007ffff78f83e8 in r_list_free (list=0x55555585df00) at list.c:82
#9 0x00007ffff66705c2 in arch_parse_reg_profile (
reg_profile=0x555555845b40 "=PC\trip\n=SP\trsp\n=BP\trbp\n=A0\trax\n=A1\trbx\n=A2\trcx\n=A3\trdx\n=SN\torax\ngpr\tfake\t.64\t795\t0\ngpr\trax\t.64\t0\t0\ngpr\trbx\t.64\t8\t0\ngpr\trcx\t.64\t16\t0\ngpr\trdx\t.64\t24\t0\ngpr\trsi\t.64\t32\t0\ngpr\trdi\t.64\t40\t0\ngpr\trbp\t.64\t48\t0"...)
at src/arch.c:132
#10 0x00007ffff666f194 in gdbr_set_reg_profile (g=0x555555861920,
str=0x555555845b40 "=PC\trip\n=SP\trsp\n=BP\trbp\n=A0\trax\n=A1\trbx\n=A2\trcx\n=A3\trdx\n=SN\torax\ngpr\tfake\t.64\t795\t0\ngpr\trax\t.64\t0\t0\ngpr\trbx\t.64\t8\t0\ngpr\trcx\t.64\t16\t0\ngpr\trdx\t.64\t24\t0\ngpr\trsi\t.64\t32\t0\ngpr\trdi\t.64\t40\t0\ngpr\trbp\t.64\t48\t0"...)
at src/libgdbr.c:119
#11 0x00007ffff666efc2 in gdbr_set_architecture (g=0x555555861920, arch=1, bits=64) at src/libgdbr.c:64
#12 0x00007ffff4fc8909 in r_debug_gdb_attach (dbg=0x5555557eeda0, pid=-1) at p/debug_gdb.c:383
#13 0x00007ffff4fc7801 in check_connection (dbg=0x5555557eeda0) at p/debug_gdb.c:27
#14 0x00007ffff4fc89c3 in r_debug_gdb_reg_profile (dbg=0x5555557eeda0) at p/debug_gdb.c:406
#15 0x00007ffff4fbf6ee in r_debug_use (dbg=0x5555557eeda0, str=0x555555815320 "gdb") at plugin.c:34
#16 0x00007ffff5316a28 in r_core_file_open (r=0x7ffff7f5a010, file=0x5555558e46e0 "gdb://127.0.0.1:1337", flags=5, loadaddr=0) at cfile.c:945
#17 0x00007ffff768d876 in r_main_radare2 (argc=6, argv=0x7fffffffded8) at radare2.c:898
#18 0x0000555555554c77 in main (argc=6, argv=0x7fffffffded8) at radare2.c:96```
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#16680>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAG75FWPYW2D4BK4EP4KO2TRN2DZ7ANCNFSM4MN35W6A>.
|
Sorry, I've updated now, to:
Still, I'm facing:
|
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Work environment
I've opened up a MIPS binary on QEMU :
sudo chroot . ./qemu-mipsel-static -g 1337 ./pwnable/Intro/stack_bof_01 testinput123
I'm trying to debug it:
r2 -a mips -d -B 0x400630 gdb://127.0.0.1:1337 pwnable/Intro/stack_bof_01
Expected behavior
Actual behavior
free(): invalid next size (fast)
Aborted (core dumped)
Steps to reproduce the behavior
Additional Logs, screenshots, source-code, configuration dump, ...
Backtrace:
The text was updated successfully, but these errors were encountered: