sftp> put foo.bar Segmentation fault (core dumped) I use FreeBSD 4.6 and OpenSSH 3.4p1 and 3.5p1. OpenSSH_3.4p1 FreeBSD-20020702, SSH protocols 1.5/2.0, OpenSSL 0x0090605f Core dump happens every time I make a mistake in file name used in PUT sftp command.
I can not duplicate this problem on UnixWare or Linux
hm, strange, perhaps freebsd glob bug? % sftp localhost Connecting to localhost... sftp> put foo.bar File "foo.bar" not found. sftp> quit %
I tried again, but still segmentation fault: nimnul@217 (~) > sftp localhost Connecting to localhost... The authenticity of host 'localhost (127.0.0.1)' can't be established. DSA key fingerprint is d2:4c:d9:fa:b6:d8:92:20:ec:a4:7f:35:19:15:a9:d6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (DSA) to the list of known hosts. Password: sftp> put aaa.bbb Segmentation fault (core dumped) I tried it on different FreeBSD machines, with the same result
Is this compiled by you? Or are you using ports or FreeBSD in-tree OpenSSH version? I can't find anyone that can mimic this. - Ben
Can you get a gdb trace of where it is failing?
root@217 (~) > gdb -c sftp.core GNU gdb 4.18 (FreeBSD) Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you ar welcome to change it and/or distribute copies of it under certain condition Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd". Core was generated by `sftp'. Program terminated with signal 11, Segmentation fault. #0 0x804c7af in ?? () (gdb) bt #0 0x804c7af in ?? () #1 0x804cd8c in ?? () #2 0x804d72f in ?? () #3 0x8049b9a in ?? () #4 0x8049505 in ?? () (gdb) Did it help? these are the only things i can do with gdb. What else can I do to help?
You need to give it the binary as well as the core to get meaningful results, ie $ gdb /path/to/sftp sftp.core (gdb) bt
The results now are: root@217 (~) > gdb -c sftp.core /usr/bin/sftp GNU gdb 4.18 (FreeBSD) Copyright 1998 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 "i386-unknown-freebsd"...(no debugging symbols found)... Core was generated by `sftp'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libssh.so.2...(no debugging symbols found)...done. Reading symbols from /usr/lib/libcrypto.so.2...(no debugging symbols found)...done. Reading symbols from /usr/lib/libc.so.4...(no debugging symbols found)...done. Reading symbols from /usr/lib/libz.so.2...(no debugging symbols found)...done. Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...done. #0 0x804c7af in free () (gdb) bt #0 0x804c7af in free () #1 0xe in ?? () #2 0x804cd8c in free () #3 0x804d72f in free () #4 0x8049b9a in free () #5 0x8049505 in free ()
> Is this compiled by you? Or are you using ports or FreeBSD in-tree OpenSSH version? I can't find anyone that can mimic this. I had to upgrade from in-tree OpenSSH to newer OpenSSH. I updated ports using cvsup, compiled ssh from ports and deleted files from old one using rm. Did I make something wrong?
FreeBSD glob has had problems in the past - I suspect that is the problem. I would recommend using the in-tree OpenSSH for FreeBSD. Please report if that breaks.
Mass change of RESOLVED bugs to CLOSED