netkit-ftp segfaults when dropping to shell

Bug #398028 reported by Karl Dane
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
netkit-ftp (Ubuntu)
New
Undecided
Unassigned

Bug Description

Confirmed on ubuntu 9.04 64bit and 32bit. Quite easy to reproduce;

rince@dell:~$ cd
rince@dell:~$ ftp
ftp> !touch file
*** glibc detected *** ftp: corrupted double-linked list: 0x00000000015b9080 ***
======= Backtrace: =========
/lib/libc.so.6[0x7fb076a07b2c]
/lib/libc.so.6[0x7fb076a098f1]
/lib/libc.so.6(__libc_malloc+0x98)[0x7fb076a0b828]
/lib/libc.so.6(_obstack_begin+0x61)[0x7fb076a0ef21]
ftp[0x40e0d4]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7fb0769ad5a6]
ftp(fclose+0x199)[0x402759]
======= Memory map: ========
00400000-00413000 r-xp 00000000 08:05 1821277 /usr/bin/netkit-ftp
00612000-00615000 rw-p 00012000 08:05 1821277 /usr/bin/netkit-ftp
00615000-00622000 rw-p 00615000 00:00 0
015a3000-015c4000 rw-p 015a3000 00:00 0 [heap]
7fb070000000-7fb070021000 rw-p 7fb070000000 00:00 0
7fb070021000-7fb074000000 ---p 7fb070021000 00:00 0
7fb075d38000-7fb075d4e000 r-xp 00000000 08:05 1410405 /lib/libgcc_s.so.1
7fb075d4e000-7fb075f4e000 ---p 00016000 08:05 1410405 /lib/libgcc_s.so.1
7fb075f4e000-7fb075f4f000 r--p 00016000 08:05 1410405 /lib/libgcc_s.so.1
7fb075f4f000-7fb075f50000 rw-p 00017000 08:05 1410405 /lib/libgcc_s.so.1
7fb075f50000-7fb075f5a000 r-xp 00000000 08:05 1409441 /lib/libnss_nis-2.9.so
7fb075f5a000-7fb076159000 ---p 0000a000 08:05 1409441 /lib/libnss_nis-2.9.so
7fb076159000-7fb07615a000 r--p 00009000 08:05 1409441 /lib/libnss_nis-2.9.so
7fb07615a000-7fb07615b000 rw-p 0000a000 08:05 1409441 /lib/libnss_nis-2.9.so
7fb07615b000-7fb076171000 r-xp 00000000 08:05 1409436 /lib/libnsl-2.9.so
7fb076171000-7fb076371000 ---p 00016000 08:05 1409436 /lib/libnsl-2.9.so
7fb076371000-7fb076372000 r--p 00016000 08:05 1409436 /lib/libnsl-2.9.so
7fb076372000-7fb076373000 rw-p 00017000 08:05 1409436 /lib/libnsl-2.9.so
7fb076373000-7fb076375000 rw-p 7fb076373000 00:00 0
7fb076375000-7fb07637d000 r-xp 00000000 08:05 1409437 /lib/libnss_compat-2.9.so
7fb07637d000-7fb07657c000 ---p 00008000 08:05 1409437 /lib/libnss_compat-2.9.so
7fb07657c000-7fb07657d000 r--p 00007000 08:05 1409437 /lib/libnss_compat-2.9.so
7fb07657d000-7fb07657e000 rw-p 00008000 08:05 1409437 /lib/libnss_compat-2.9.so
7fb07657e000-7fb07658a000 r-xp 00000000 08:05 1409439 /lib/libnss_files-2.9.so
7fb07658a000-7fb076789000 ---p 0000c000 08:05 1409439 /lib/libnss_files-2.9.so
7fb076789000-7fb07678a000 r--p 0000b000 08:05 1409439 /lib/libnss_files-2.9.so
7fb07678a000-7fb07678b000 rw-p 0000c000 08:05 1409439 /lib/libnss_files-2.9.so
7fb07678b000-7fb07678d000 r-xp 00000000 08:05 1409433 /lib/libdl-2.9.so
7fb07678d000-7fb07698d000 ---p 00002000 08:05 1409433 /lib/libdl-2.9.so
7fb07698d000-7fb07698e000 r--p 00002000 08:05 1409433 /lib/libdl-2.9.so
7fb07698e000-7fb07698f000 rw-p 00003000 08:05 1409433 /lib/libdl-2.9.so
7fb07698f000-7fb076af7000 r-xp 00000000 08:05 1409430 /lib/libc-2.9.so
7fb076af7000-7fb076cf7000 ---p 00168000 08:05 1409430 /lib/libc-2.9.so
7fb076cf7000-7fb076cfb000 r--p 00168000 08:05 1409430 /lib/libc-2.9.so
7fb076cfb000-7fb076cfc000 rw-p 0016c000 08:05 1409430 /lib/libc-2.9.so
7fb076cfc000-7fb076d01000 rw-p 7fb076cfc000 00:00 0
7fb076d01000-7fb076d3a000 r-xp 00000000 08:05 1409105 /lib/libncurses.so.5.7
7fb076d3a000-7fb076f39000 ---p 00039000 08:05 1409105 /lib/libncurses.so.5.7
7fb076f39000-7fb076f3d000 r--p 00038000 08:05 1409105 /lib/libncurses.so.5.7
7fb076f3d000-7fb076f3e000 rw-p 0003c000 08:05 1409105 /lib/libncurses.so.5.7
7fb076f3e000-7fb076f74000 r-xp 00000000 08:05 1409159 /lib/libreadline.so.5.2
7fb076f74000-7fb077173000 ---p 00036000 08:05 1409159 /lib/libreadline.so.5.2
7fb077173000-7fb077175000 r--p 00035000 08:05 1409159 /lib/libreadline.so.5.2
7fb077175000-7fb07717b000 rw-p 00037000 08:05 1409159 /lib/libreadline.so.5.2
7fb07717b000-7fb07717c000 rw-p 7fb07717b000 00:00 0
7fb07717c000-7fb07719c000 r-xp 00000000 08:05 1409427 /lib/ld-2.9.so
7fb077333000-7fb077372000 r--p 00000000 08:05 1671640 /usr/lib/locale/en_GB.utf8/LC_CTYPE
7fb077372000-7fb077375000 rw-p 7fb077372000 00:00 0
7fb077390000-7fb077391000 rw-p 7fb077390000 00:00 0
7fb077391000-7fb077398000 r--s 00000000 08:05 1368216 /usr/lib/gconv/gconv-modules.cache
7fb077398000-7fb07739b000 rw-p 7fb077398000 00:00 0
7fb07739b000-7fb07739c000 r--p 0001f000 08:05 1409427 /lib/ld-2.9.so
7fb07739c000-7fb07739d000 rw-p 00020000 08:05 1409427 /lib/ld-2.9.so
7fff7f388000-7fff7f39d000 rw-p 7ffffffea000 00:00 0 [stack]
7fff7f3ff000-7fff7f400000 r-xp 7fff7f3ff000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted
rince@dell:~$

Other details;

rince@dell:/tmp$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

rince@dell:/tmp$ apt-cache policy ftp
ftp:
  Installed: 0.17-18
  Candidate: 0.17-18
  Version table:
 *** 0.17-18 0
        500 http://gb.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Don Cristóbal (doncristobal) wrote :
Download full text (6.1 KiB)

I'm not at all an expert. Therefore, I can only guess that my bug is the same as here. I had several crashes when ftp-ing in the terminal when I tried to cd to another directory on the local file system.

1st example:
--
$ ftp [server]
Connected to [server].
220 ProFTPD 1.3.1 Server (ProFTPD) [IP address]
Name (...): [name]
331 Password required for [name]
Password:
230 User [name] logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd httpdocs
250 CWD command successful
ftp> ls
200 PORT command successful
150 Opening ASCII mode data connection for file list
drwxr-x--- 5 gaga psaserv 4096 Jul 26 09:07 .
drwxr-xr-x 13 root root 4096 Jun 12 2008 ..
(...)
226-Transfer complete
226 Quotas off
ftp> mkdir div
257 "/httpdocs/div" - Directory successfully created
ftp> ls
200 PORT command successful
150 Opening ASCII mode data connection for file list
drwxr-x--- 6 gaga psaserv 4096 Jul 26 09:25 .
drwxr-xr-x 13 root root 4096 Jun 12 2008 ..
(...)
drwxr-xr-x 2 gaga psacln 4096 Jul 26 09:25 div
(...)
226-Transfer complete
226 Quotas off
ftp> cd div
250 CWD command successful
ftp> ls
200 PORT command successful
150 Opening ASCII mode data connection for file list
drwxr-xr-x 2 gaga psacln 4096 Jul 26 09:25 .
drwxr-x--- 6 gaga psaserv 4096 Jul 26 09:25 ..
226-Transfer complete
226 Quotas off
ftp> !cd [local directory that did not exist because I was not where I thought I was]
+bash: line 0: cd: last.fm: No such file or directory
Segmentation fault (core dumped)
--

2nd example:
--
ftp> !cd [inexisting local directory]
+bash: line 0: cd: gadfads: No such file or directory
*** glibc detected *** ftp: malloc(): memory corruption: 0x09c91ae8 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7e30276]
/lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x95)[0xb7e319c5]
/lib/tls/i686/cmov/libc.so.6(_obstack_begin+0x5e)[0xb7e3490e]
ftp[0x8054fb1]
ftp[0x8055858]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dd4775]
ftp[0x8049c71]
======= Memory map: ========
08048000-08059000 r-xp 00000000 08:02 341382 /usr/bin/netkit-ftp
08059000-0805b000 rw-p 00010000 08:02 341382 /usr/bin/netkit-ftp
0805b000-08069000 rw-p 0805b000 00:00 0
09c83000-09ca4000 rw-p 09c83000 00:00 0 [heap]
b7bf1000-b7bfe000 r-xp 00000000 08:02 251536 /lib/libgcc_s.so.1
b7bfe000-b7bff000 r--p 0000c000 08:02 251536 /lib/libgcc_s.so.1
b7bff000-b7c00000 rw-p 0000d000 08:02 251536 /lib/libgcc_s.so.1
b7c00000-b7c21000 rw-p b7c00000 00:00 0
b7c21000-b7d00000 ---p b7c21000 00:00 0
b7d21000-b7d60000 r--p 00000000 08:02 374030 /usr/lib/locale/en_US.utf8/LC_CTYPE
b7d60000-b7d72000 r-xp 00000000 08:02 268756 /lib/tls/i686/cmov/libresolv-2.9.so
b7d72000-b7d73000 r--p 00011000 08:02 268756 /lib/tls/i686/cmov/libresolv-2.9.so
b7d73000-b7d74000 rw-p 00012000 08:02 268756 /lib/tls/i686/cmov/libresolv-2.9.so
b7d74000-b7d76000 rw-p b7d74000 00:00 0
b7d76000-b7d7b000 r-xp 00000000 08:02 268743 /lib/tls/i686/cmov/libnss_dns-2.9.so
b7d7b000-b7d7c000 r--p 00004000 08:02 268743 /lib/tls/i686/cmov/libnss_dns-2.9.so
b7d7c000-b7d7d000 rw-p ...

Read more...

Revision history for this message
Don Cristóbal (doncristobal) wrote :

Oh sorry, I forgot my version information: Xubuntu Jaunty (9.04), updated as of July 26, 2009.

$ apt-cache policy ftp
ftp:
  Installed: 0.17-18
  Candidate: 0.17-18
  Version table:
 *** 0.17-18 0
        500 http://ch.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.