From owner-freebsd-arch@FreeBSD.ORG Fri May 7 23:50:12 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ECEC16A4CE; Fri, 7 May 2004 23:50:12 -0700 (PDT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D80643D39; Fri, 7 May 2004 23:50:11 -0700 (PDT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 70D3B1FFDD3; Sat, 8 May 2004 08:50:09 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 84BBD1FFDC1; Sat, 8 May 2004 08:50:07 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 038B31566B; Sat, 8 May 2004 06:40:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 00C1F154E2; Sat, 8 May 2004 06:40:41 +0000 (UTC) Date: Sat, 8 May 2004 06:40:41 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Eugene Grosbein In-Reply-To: <20040508034514.GA937@grosbein.pp.ru> Message-ID: References: <20040508034514.GA937@grosbein.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: arch@freebsd.org cc: yar@freebsd.org cc: net@freebsd.org Subject: Re: bin/65928: [PATCH] stock ftpd uses superuser credentials for active mode sockets X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 06:50:12 -0000 On Sat, 8 May 2004, Eugene Grosbein wrote: Hi, > When an active IPv4 TCP connection between > localIP:localport and remoteIP1:remoteport1 exists, > it is not possible for local non-root user to create outgoing > TCP connection from localIP:localport to remoteIP2:remoteport2. > > Why? It prevents http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/65928 > from resolving. to do it with other wording: if in active mode data is send to remote, the server uses ftp-data as port (which is 20 [ftp(21)-1]) and you are running into creating a socket in the privileged port range: net.inet.ip.portrange.reservedlow to net.inet.ip.portrange.reservedhigh which "only may be opened by root-owned processes" [ip(4)]. -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/