This is a discussion on SIGSEGV error on execve system call within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> I write a code with indirecting execve() system call as below.. OS : HP-UX 11.11i, (64-bit Kernel) Memory : ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I write a code with indirecting execve() system call as below.. OS : HP-UX 11.11i, (64-bit Kernel) Memory : 512 MB int my_execve(char *path, char *argv[], char *envp[]) { /* call original system call */ return execve(path, argv, envp); } After loading a module, telnet to system which load my module from remote. Then, fail to prompt a shell...error occurred as below... --------------------------- login: root Password: Please wait...checking for disk quotas Pid 4025 received a SIGSEGV for stack growth failure. Possible causes: insufficient memory or swap space, or stack size exceeded maxssiz. No shell ---------------------------- So, Reconfigure Kernel parameters, maxdsiz, maxtsiz, maxssiz, nfile, nproc, etc. But....I have the same result.... Belows are truss text for inetd...(only catching for execve) HELP ME....!!!! ( Attached to process 516 ("/usr/sbin/inetd") [32-bit] ) 516: select(31, 0x7aff0390, NULL, NULL, NULL) [sleeping] 4024: execve("/usr/lbin/telnetd", 0x4000a8a8, 0x7aff017c) [entry] argv[0] @ 0x4000a898: "telnetd" env[0] @ 0x7aff0044: "LANG=ko_KR.eucKR" env[1] @ 0x7aff0140: "TZ=KST-9" 4024: execve("/usr/lbin/telnetd", 0x4000a8a8, 0x7aff017c) = 0 [32-bit] 4025: execve("/usr/bin/login", 0x7aff0808, 0x40004d60) [entry] argv[0] @ 0x40001cf8: "login" argv[1] @ 0x40001d00: "-h" argv[2] @ 0x7aff0238: "192.168.1.68" argv[3] @ 0x40001d08: "-p" env[0] @ 0x40002270: "TERM=vt100" 4025: execve("/usr/bin/login", 0x7aff0808, 0x40004d60) = 0 [32-bit] 4025: In user-mode [running] 4026: execve("/usr/bin/sh", 0x7aff0418, 0x400010e0) [entry] argv[0] @ 0xffffffffc01402b8: argv[1] @ 0xffffffffc01402c0: argv[2] @ 0x7aff01b8: "/usr/bin/quota root" env[0] @ 0x40001690: "HOME=/" env[1] @ 0x40002550: "PATH=:/usr/sbin:/usr/bin:/sbin" env[2] @ 0x40001670: "LOGNAME=root" env[3] @ 0x40001630: "TERM=vt100" env[4] @ 0x40001a98: "SHELL=/sbin/sh" env[5] @ 0x400011f8: "MAIL=/var/mail/root" 4026: execve("/usr/bin/sh", 0x7aff0418, 0x400010e0) = 0 [32-bit] 4027: execve("/usr/bin/quota", 0x400128e8, 0x40012928) [entry] argv[0] @ 0x40012900: "/usr/bin/quota" argv[1] @ 0x40012918: "root" env[0] @ 0x40012960: "_=/usr/bin/quota" env[1] @ 0x40012980: "PATH=:/usr/sbin:/usr/bin:/sbin" env[2] @ 0x400129a8: "COLUMNS=122" env[3] @ 0x400129c0: "LOGNAME=root" env[4] @ 0x400129d8: "MAIL=/var/mail/root" env[5] @ 0x400129f8: "SHELL=/sbin/sh" env[6] @ 0x40012a10: "HOME=/" env[7] @ 0x40012a20: "TERM=vt100" env[8] @ 0x40012a38: "PWD=/" env[9] @ 0x40012a48: "LINES=31" 4027: execve("/usr/bin/quota", 0x400128e8, 0x40012928) = 0 [32-bit] 4025: execve("/sbin/sh", 0x400038907aff01c8, 0x400010e0) [entry] env[0] @ 0x40001690: "HOME=/" env[1] @ 0x40002550: "PATH=:/usr/sbin:/usr/bin:/sbin" env[2] @ 0x40001670: "LOGNAME=root" env[3] @ 0x40001630: "TERM=vt100" env[4] @ 0x40001a98: "SHELL=/sbin/sh" env[5] @ 0x400011f8: "MAIL=/var/mail/root" 4025: execve("/sbin/sh", 0x400038907aff01c8, 0x400010e0) ERR#14 EFAULT 4024: Received signal 18, SIGCLD, in getmsg(), [caught], no siginfo 516: Received signal 18, SIGCLD, in select(), [caught], no siginfo 516: select(31, 0x7aff0390, NULL, NULL, NULL) [sleeping] |
| ||||
| In article <9e1964cc.0309080143.35be3987@posting.google.com >, ujoo wrote: >int my_execve(char *path, char *argv[], char *envp[]) >{ > /* call original system call */ > return execve(path, argv, envp); >} I suspect you may not have terminated argv[] and envp[] with (char *)0. Why do this anyway ? You don't get a return from a successful execve(). -- <rosannetuerlk@ifrance.com> http://www.ulikeit.biz/promo.php?id= <joy_edit@mail.online.sh.cn> is over quota |