Closed duguhaotian closed 1 month ago
/proc/fd like below
$ ls -l /proc/3543604/fd
total 0
lr-x------. 1 root root 64 May 23 09:16 0 -> 'pipe:[22250976]'
l-wx------. 1 root root 64 May 23 09:16 1 -> 'pipe:[22250977]'
l-wx------. 1 root root 64 May 23 09:16 2 -> 'pipe:[22250978]'
lrwx------. 1 root root 64 May 23 09:16 20 -> /dev/ptmx
lrwx------. 1 root root 64 May 23 09:16 21 -> /dev/ptmx
lrwx------. 1 root root 64 May 23 09:16 4 -> 'socket:[22247676]'
lrwx------. 1 root root 64 May 23 09:16 5 -> /dev/pts/9
lrwx------. 1 root root 64 May 23 09:16 6 -> /run/systemd/resolve/stub-resolv.conf // this is new fd add by parasite
Same problem seemed to happent to me before, can anyone have a look at it? Other syscalls such as sys_close have the valid return value, but sys_open always returns -1?
i found reason, never return non-zero in parasite_daemon_cmd if nedd return open fd, we should use args return
Description
i want to test compel to open many files in victim process.
Steps to reproduce the issue:
change code in
compel/test/infect
Describe the results you received:
Describe the results you expected:
open three file success