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

dpa and -- #1761

Closed
zonkzonk opened this issue Nov 29, 2014 · 7 comments
Closed

dpa and -- #1761

zonkzonk opened this issue Nov 29, 2014 · 7 comments

Comments

@zonkzonk
Copy link
Contributor

morn,

dpa + -- at the end of the file argument crashes r2:

r2 -qc "dpa" '/bin/ls' -- ;

Core was generated by `r2 -qc dpa /bin/ls --'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f9cfb161354 in cmd_debug_pid (core=0x607980 <r>, input=0xa23b71 "pa") at cmd_debug.c:206

warning: Source file is more recent than executable.
206                     } else r_debug_attach (core->dbg, core->file->desc->fd);
(gdb) bt
#0  0x00007f9cfb161354 in cmd_debug_pid (core=0x607980 <r>, input=0xa23b71 "pa") at cmd_debug.c:206
#1  0x00007f9cfb166948 in cmd_debug (data=0x607980 <r>, input=0xa23b71 "pa") at cmd_debug.c:1670
#2  0x00007f9cfb1b3092 in r_cmd_call (cmd=0x9e8bf0, input=0xa23b70 "dpa") at cmd_api.c:179
#3  0x00007f9cfb192fc2 in r_core_cmd_subst_i (core=0x607980 <r>, cmd=0xa23b70 "dpa") at cmd.c:1370
#4  0x00007f9cfb191723 in r_core_cmd_subst (core=0x607980 <r>, cmd=0xa23b70 "dpa") at cmd.c:923
#5  0x00007f9cfb193b5c in r_core_cmd (core=0x607980 <r>, cstr=0x7fffbcfe8d4f "dpa", log=0) at cmd.c:1576
#6  0x00007f9cfb194111 in r_core_cmd0 (user=0x607980 <r>, cmd=0x7fffbcfe8d4f "dpa") at cmd.c:1699
#7  0x0000000000404d1f in main (argc=5, argv=0x7fffbcfe77d8, envp=0x7fffbcfe7808) at radare2.c:692

r2 version: d4164af, 64bit

Greetings
--zlul

update: also in dpf, does not crash in FreeBSD, happens with -d and without

@radare
Copy link
Collaborator

radare commented Nov 29, 2014

cant reproduce

On 29 Nov 2014, at 10:58, zonkzonk notifications@github.com wrote:

morn,

dpa + -- at the end of the file argument crashes r2:

r2 -qc "dpa" '/bin/ls' -- ;

Core was generated by `r2 -qc dpa /bin/ls --'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f9cfb161354 in cmd_debug_pid (core=0x607980 , input=0xa23b71 "pa") at cmd_debug.c:206

warning: Source file is more recent than executable.
206 } else r_debug_attach (core->dbg, core->file->desc->fd);
(gdb) bt
#0 0x00007f9cfb161354 in cmd_debug_pid (core=0x607980 , input=0xa23b71 "pa") at cmd_debug.c:206
#1 0x00007f9cfb166948 in cmd_debug (data=0x607980 , input=0xa23b71 "pa") at cmd_debug.c:1670
#2 0x00007f9cfb1b3092 in r_cmd_call (cmd=0x9e8bf0, input=0xa23b70 "dpa") at cmd_api.c:179
#3 0x00007f9cfb192fc2 in r_core_cmd_subst_i (core=0x607980 , cmd=0xa23b70 "dpa") at cmd.c:1370
#4 0x00007f9cfb191723 in r_core_cmd_subst (core=0x607980 , cmd=0xa23b70 "dpa") at cmd.c:923
#5 0x00007f9cfb193b5c in r_core_cmd (core=0x607980 , cstr=0x7fffbcfe8d4f "dpa", log=0) at cmd.c:1576
#6 0x00007f9cfb194111 in r_core_cmd0 (user=0x607980 , cmd=0x7fffbcfe8d4f "dpa") at cmd.c:1699
#7 0x0000000000404d1f in main (argc=5, argv=0x7fffbcfe77d8, envp=0x7fffbcfe7808) at radare2.c:692
r2 version: d4164af d4164af
Greetings
--zlul


Reply to this email directly or view it on GitHub #1761.

@zonkzonk
Copy link
Contributor Author

I also get this with 32bit on the same r2 version, so questions is: How and with wat do you test ?

[ 483.671429] r2[9713]: segfault at 8 ip b7724b59 sp bfd2df50 error 4 in libr_core.so.0.9.8.git[b7705000+b5000]

@Maijin
Copy link
Contributor

Maijin commented Nov 29, 2014

I can reproduce. Valgrind: http://pastie.org/9750716

Linux x64, Ubuntu 14.04.1 LTS d4164af

@crowell
Copy link
Collaborator

crowell commented Dec 1, 2014

I can repro too. ubuntu 14.04 amd64.

core->file is null, I'll make a pr

@zonkzonk
Copy link
Contributor Author

zonkzonk commented Dec 1, 2014

radare : 12/01/14 11:44 crowell: the dpa bug is fixed, but it is still present in dpf
radare : 12/01/14 11:44 pancake: ^^

@radare
Copy link
Collaborator

radare commented Dec 1, 2014

fixed
On 12/01/2014 11:45 AM, zonkzonk wrote:

radare : 12/01/14 11:44 crowell: the dpa bug is fixed, but it is still
present in dpf
radare : 12/01/14 11:44 pancake: ^^


Reply to this email directly or view it on GitHub
#1761 (comment).

@zonkzonk
Copy link
Contributor Author

zonkzonk commented Dec 1, 2014

Tanks for closing the issue. :)

@radare radare closed this as completed Dec 1, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants