From owner-freebsd-bugs Fri Apr 10 02:56:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA08437 for freebsd-bugs-outgoing; Fri, 10 Apr 1998 02:56:08 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from santra.hut.fi (santra.hut.fi [130.233.224.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA08427 for ; Fri, 10 Apr 1998 02:56:05 -0700 (PDT) (envelope-from tri@pooh.tky.hut.fi) Received: from pooh.tky.hut.fi (pooh.tky.hut.fi [130.233.23.135]) by santra.hut.fi (8.8.8/8.8.7) with ESMTP id MAA10406; Fri, 10 Apr 1998 12:56:02 +0300 (EET DST) Received: (from tri@localhost) by pooh.tky.hut.fi (8.8.8/8.8.8) id MAA13090; Fri, 10 Apr 1998 12:56:01 +0300 (EEST) (envelope-from tri) Date: Fri, 10 Apr 1998 12:56:01 +0300 (EEST) Message-Id: <199804100956.MAA13090@pooh.tky.hut.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit From: Timo J Rinne To: Max Euston cc: freebsd-bugs@FreeBSD.ORG Subject: RE: bin/6254: ftp client follows NULL pointer In-Reply-To: <01BD63C9.148B6D20.meuston@jmrodgers.com> References: <01BD63C9.148B6D20.meuston@jmrodgers.com> Reply-to: tri@iki.fi Organization: Helsinki University of Technology, Espoo, Finland X-Face: 7N&%4=;/9+e`m7vVp3kmZ^FZ~;TBHua/@dBeFi*{xAoyz+8feePXCUmOK[GaY*0[QU`{lo *D3.D?xc>nBKUHDdXo)*OiG-MGf-a2dCZ5{yYMZV9:+H1h:%g$']XOPwUx{<5fH@l?+U8B Cr!lG(V:g=`_gdg86&u$/ez/jG_H3uU8!TB&ZuEz-BKqfBL3HGS@oA#,GsugP3o3.ckI- Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Max Euston writes: > Are you sure you are running 'ftp' (client) *from* a FreeBSD box :-)? I > have seen this happen when running 'ftp' from another system to connect to > 'ftpd' (server) on a FreeBSD box. Yes. >>>>>>>>>>>>>>>>>> C U T H E R E >>>>>>>>>>>>>>>>>> 926.pooh:~> uname -a FreeBSD pooh.tky.hut.fi 3.0-971225-SNAP FreeBSD 3.0-971225-SNAP #0: Thu Jan 8 19:33:22 EET 1998 tri@pooh.tky.hut.fi:/usr/src/sys/compile/POOH i386 928.pooh:~> ftp -d 127.1 Connected to 127.1. 220 pooh.tky.hut.fi FTP server (Version 6.00) ready. Name (127.1:tri): # Control-D here----------^ ---> USER °ΝΏ 331 Password required for °ΝΏ. Password: # Control-D here--^ ---> PASS XXXX 530 Login incorrect. ftp: Login failed. ---> SYST 215 UNIX Type: L8 Version: BSD-199506 Remote system type is UNIX. Using binary mode to transfer files. ftp> # Control-D here--^ ---> QUIT 221 Goodbye. 928.pooh:~> >>>>>>>>>>>>>>>>>> C U T H E R E >>>>>>>>>>>>>>>>>> > If this is the case, I don't think that the 'ftpd' server on FreeBSD cou > ld/should try to verify the user name (feel free to convince me otherwise > :-)). If other clients ('ftp') send 'USER ', how would we verify > user names with non-ascii character sets (i.e. with high bit set)? (I am > by no means an expert when it comes to non-US character sets). So, in FreeBSD 3.0 current (972512) and for example NetBSD-1.3 it forks as above. I've added some comments to make it more readable. Should I really read the source? Ok. I do it. Return value of fgets in line 260 of util.c in ftp client source is not checked. Now it should be straightforward! //Rinne To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message