From dmitry@asbaikaltv.ru  Fri May  5 20:54:10 2000
Return-Path: <dmitry@asbaikaltv.ru>
Received: from mh.irtel.ru (ns2.irtel.ru [195.46.96.1])
	by hub.freebsd.org (Postfix) with ESMTP id 33E8237BDC8
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  5 May 2000 20:54:08 -0700 (PDT)
	(envelope-from dmitry@asbaikaltv.ru)
Received: from dialpool.irtel.ru by mh.irtel.ru id MAA10166
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 6 May 2000 12:53:58 +0900
Received: from alien.shel.asbaikaltv.ru (alien.shel.asbaikaltv.ru [192.168.0.119])
	by crawl.shel.asbaikaltv.ru (8.10.1/8.10.1) with ESMTP id e463ca604377
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 6 May 2000 12:38:36 +0900 (IRKST)
Message-Id: <Pine.BSF.4.21.0005061234400.4702-100000@alien.shel.asbaikaltv.ru>
Date: Sat, 6 May 2000 12:40:27 +0900 (IRKST)
From: Chagin Dmitry <dmitry@asbaikaltv.ru>
To: FreeBSD-gnats-submit@freebsd.org
Subject: possible bug in ftpd

>Number:         18405
>Category:       bin
>Synopsis:       ftpd open conn in low portrange if client in passive mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mikeh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 07 01:10:06 PDT 2000
>Closed-Date:    Mon Oct 1 22:32:08 PDT 2001
>Last-Modified:  Mon Oct 01 22:32:19 PDT 2001
>Originator:     Dmitry Chagin
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
as baikal tv, broadcasting company, siberia
>Environment:

FreeBSD alien 5.0-CURRENT FreeBSD 5.0-CURRENT #24: Fri Apr 28 00:31:21
IRKST 2000     root@alien.shel.asbaikaltv.ru:/usr/src/sys/compile/ALIENS  i386

FreeBSD crawl 4.0-STABLE FreeBSD 4.0-STABLE #33: Fri May  5 18:37:40 IRKST
2000     root@crawl:/usr/src/sys/compile/RL  i386

>Description:

when ftp from machine running current to 4.0-STABLE and on client envir
set FTP_PASSIVE_MODE=YES i see in tcpdump out that:

552 crawl.shel.asbaikaltv.ru.ftp > alien.shel.asbaikaltv.ru.audio-activmail: P
936 alien.shel.asbaikaltv.ru.audio-activmail >crawl.shel.asbaikaltv.ru.ftp: P
938 crawl.shel.asbaikaltv.ru.ftp >alien.shel.asbaikaltv.ru.audio-activmail: P
256 alien.shel.asbaikaltv.ru.video-activmail >crawl.shel.asbaikaltv.ru.1626:
853 crawl.shel.asbaikaltv.ru.1626 > alien.shel.asbaikaltv.ru.video-activmail:
002 alien.shel.asbaikaltv.ru.video-activmail >crawl.shel.asbaikaltv.ru.1626:

ie ftpd open data connections on lowrange ports

ftpd start in inetd:
ftp     stream  tcp     nowait  root    /usr/libexec/ftpd       ftpd -l

sysctl set to:
net.inet.ip.portrange.lowfirst: 1023
net.inet.ip.portrange.lowlast: 600
net.inet.ip.portrange.first: 1024
net.inet.ip.portrange.last: 5000
net.inet.ip.portrange.hifirst: 49152
net.inet.ip.portrange.hilast: 65535

in ftpd manpages i see
U      In previous versions of ftpd, when a passive mode client request-
       ed a data connection to the server, the server would use data
       ports in the range 1024..4999.  Now, by default, the server will
       use data ports in the range 49152..65535.  Specifying this option
       will revert to the old behavior.

ftpd bug or manpages must be fixed?

>How-To-Repeat:

ftp to current or 4.0-STABLE end use tcpdump to see traffic when download
something

>Fix:

i don't know yet :(



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: mikeh 
State-Changed-When: Sat Jun 16 12:56:26 PDT 2001 
State-Changed-Why:  
I can't reproduce this problem. Is this still a problem for you? 


Responsible-Changed-From-To: freebsd-bugs->mikeh 
Responsible-Changed-By: mikeh 
Responsible-Changed-When: Sat Jun 16 12:56:26 PDT 2001 
Responsible-Changed-Why:  
I'll handle feedback. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18405 
State-Changed-From-To: feedback->closed 
State-Changed-By: mikeh 
State-Changed-When: Mon Oct 1 22:32:08 PDT 2001 
State-Changed-Why:  
Feedback timeout. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18405 
>Unformatted:
