From chd@fortress.intercom.net.ua  Tue Nov 19 01:08:48 2002
Return-Path: <chd@fortress.intercom.net.ua>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1C4EC37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Nov 2002 01:08:48 -0800 (PST)
Received: from fortress.intercom.net.ua (fortress.intercom.net.ua [195.13.40.132])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7217643EA3
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Nov 2002 01:08:46 -0800 (PST)
	(envelope-from chd@fortress.intercom.net.ua)
Received: from fortress.intercom.net.ua (localhost [127.0.0.1])
	by fortress.intercom.net.ua (8.12.6/8.12.3/chd) with ESMTP id gAJ98dKe017919
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Nov 2002 11:08:41 +0200 (EET)
	(envelope-from chd@fortress.intercom.net.ua)
Received: (from root@localhost)
	by fortress.intercom.net.ua (8.12.6/8.12.3/Submit) id gAJ98bwH017918;
	Tue, 19 Nov 2002 11:08:37 +0200 (EET)
	(envelope-from chd)
Message-Id: <200211190908.gAJ98bwH017918@fortress.intercom.net.ua>
Date: Tue, 19 Nov 2002 11:08:37 +0200 (EET)
From: Dmitry Cherkasov <chd@intercom.net.ua>
Reply-To: Dmitry Cherkasov <chd@intercom.net.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ftphosts causes ftpd failure
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         45472
>Category:       bin
>Synopsis:       ftphosts causes ftpd failure
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 19 01:10:02 PST 2002
>Closed-Date:    Tue Nov 19 01:56:18 PST 2002
>Last-Modified:  Tue Nov 19 01:56:18 PST 2002
>Originator:     Dmitry Cherkasov
>Release:        FreeBSD 4.7-RELEASE-p2 i386
>Organization:
ISP Intercom
>Environment:
System: FreeBSD fortress.intercom.net.ua 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #0: Mon Nov 18 21:14:12 EET 2002 chd@fortress.intercom.net.ua:/usr/src/sys/compile/Fortress i386


	
>Description:
	If any not empty file /etc/ftphosts is present, and hostname is not 127.0.0.1 or localhost, ftpd dumps core.
	If /etc/ftphosts is empty or absent, ftpd operates normally.
	No any dependance upon ftpd or inetd command-line options or /etc/hosts.allow contents have been noticed. 
>How-To-Repeat:
	1) build FreeBSD 4.7-RELEASE-p2 i386
	2) allow starting ftpd in /etc/inetd.conf, (re)start inetd
	3) remove /etc/ftphosts if it is present
	4) connect to ftp port, for example:

		ftp <your-IP-address>

	see that there are no problems
	5) create /etc/ftphosts with any not empty contents according to ftpd(8), for example:

		<your-IP-address>	ftp

	6) connect to ftpd -- see that service is not available
	7) substitude the contents in /etc/ftphosts with th following line:

		127.0.0.1	ftp

	see ftpd operating normally again.
	
>Fix:

	Workaround: downgrade to 4.7-RELEASE-p1


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Tue Nov 19 01:54:13 PST 2002 
State-Changed-Why:  
Yar fixed this bug in rev. 1.131 and rev. 1.62.2.40 
src/libexec/ftpd/ftpd.c in -CURRENT and RELENG_4. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45472 
>Unformatted:
