Yes, but that seems fake: even after filling those config files there is a core dump
gdb on the unrar.code does not reveal function calls (just hex code). Is that because it is a stripped (so no debug) unrar binary? Or am I using gdb wrong?
Plain system:
Code: Select all
$ truss /home/sander/nzbget-20.0/unrar
readlink("/etc/malloc.conf",0x7fffffffe6e0,1024) ERR#2 'No such file or directory'
issetugid() = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34363158528 (0x800343000)
munmap(0x800343000,4194304) = 0 (0x0)
mmap(0x0,8384512,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34363158528 (0x800343000)
munmap(0x800343000,774144) = 0 (0x0)
munmap(0x800800000,3416064) = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34368126976 (0x800800000)
sysarch(AMD64_SET_FSBASE,0x7fffffffeb58) = 0 (0x0)
ioctl(1,TIOCGETA,0x7fffffffeae8) = 0 (0x0)
ioctl(2,TIOCGETA,0x7fffffffeae8) = 0 (0x0)
ioctl(0,TIOCGETA,0x7fffffffeae8) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0)
sigaction(SIGINT,{ 0x245490 SA_RESTART|SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0)
sigaction(SIGTERM,{ 0x245490 SA_RESTART|SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
access("/home/sander/.rarrc",F_OK) ERR#2 'No such file or directory'
access("/etc/.rarrc",F_OK) ERR#2 'No such file or directory'
access("/etc/rar/.rarrc",F_OK) ERR#2 'No such file or directory'
access("/usr/lib/.rarrc",F_OK) ERR#2 'No such file or directory'
access("/usr/local/lib/.rarrc",F_OK) ERR#2 'No such file or directory'
access("/usr/local/etc/.rarrc",F_OK) ERR#2 'No such file or directory'
SIGNAL 11 (SIGSEGV)
process killed, signal = 11 (core dumped)
$
With /etc/malloc.conf and /home/sander/.rarrc filled, there is still a core dump:
Code: Select all
$ truss /home/sander/nzbget-20.0/unrar
readlink("/etc/malloc.conf","abort:false,junk:false",1024) = 22 (0x16)
issetugid() = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34363158528 (0x800343000)
munmap(0x800343000,4194304) = 0 (0x0)
mmap(0x0,8384512,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34363158528 (0x800343000)
munmap(0x800343000,774144) = 0 (0x0)
munmap(0x800800000,3416064) = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34368126976 (0x800800000)
sysarch(AMD64_SET_FSBASE,0x7fffffffeb68) = 0 (0x0)
ioctl(1,TIOCGETA,0x7fffffffeaf8) = 0 (0x0)
ioctl(2,TIOCGETA,0x7fffffffeaf8) = 0 (0x0)
ioctl(0,TIOCGETA,0x7fffffffeaf8) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0)
sigaction(SIGINT,{ 0x245490 SA_RESTART|SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0)
sigaction(SIGTERM,{ 0x245490 SA_RESTART|SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
access("/home/sander/.rarrc",F_OK) = 0 (0x0)
SIGNAL 11 (SIGSEGV)
process killed, signal = 11 (core dumped)
$
gdb on core:
Code: Select all
$ gdb unrar
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
(gdb) core unrar.core
warning: core file may not match specified executable file.
Core was generated by `./unrar'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000248864 in ?? ()
(gdb) bt
#0 0x0000000000248864 in ?? ()
#1 0x000000000024baf6 in ?? ()
#2 0x000000000025798a in ?? ()
#3 0x00000000002839be in ?? ()
#4 0x00000000002820c8 in ?? ()
#5 0x000000000023f31d in ?? ()
#6 0x000000000023f16f in ?? ()
#7 0x0000000000000001 in ?? ()
#8 0x00007fffffffedd8 in ?? ()
#9 0x0000000000000000 in ?? ()
(gdb)