From owner-freebsd-net@FreeBSD.ORG Sun Apr 13 18:15:37 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52E8637B401 for ; Sun, 13 Apr 2003 18:15:37 -0700 (PDT) Received: from pit.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E01743FB1 for ; Sun, 13 Apr 2003 18:15:36 -0700 (PDT) (envelope-from barney@pit.databus.com) Received: from pit.databus.com (localhost [127.0.0.1]) by pit.databus.com (8.12.9/8.12.9) with ESMTP id h3E1FVdN081198; Sun, 13 Apr 2003 21:15:31 -0400 (EDT) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.12.9/8.12.9/Submit) id h3E1FVh7081197; Sun, 13 Apr 2003 21:15:31 -0400 (EDT) Date: Sun, 13 Apr 2003 21:15:31 -0400 From: Barney Wolff To: Mike Silbersack Message-ID: <20030414011530.GA80964@pit.databus.com> References: <109.225ca595.2bc723f2@aol.com> <20030412.204912.76964336.imp@bsdimp.com> <20030413030500.GA64896@pit.databus.com> <20030412.212059.42399637.imp@bsdimp.com> <20030413142156.O44423@odysseus.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030413142156.O44423@odysseus.silby.com> User-Agent: Mutt/1.4.1i X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) cc: barney@pit.databus.com cc: "M. Warner Losh" cc: net@freebsd.org Subject: Re: connect(2) behavior with unreacheable hosts X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 01:15:37 -0000 On Sun, Apr 13, 2003 at 02:23:54PM -0500, Mike Silbersack wrote: > Barney, have you tried doing some sort of test where sendmail or ftpd > tries making a connection to a TTL exceeded IP? I'm curious if they > handle the situation gracefully or not. (If they don't, then maybe this > is serious enough to require security branch merges.) Here's ftp's behavior, first from an unpatched system: mob:/root# ftp 1.2.3.4 ftp: getsockname: Connection reset by peer ftp> quit mob:/root# ftp 1.2.3.5 ftp: connect: No route to host ftp> quit (1.2.3.4 is the looped address, and the getsockname comes back instantly, since the loop is over GigE. 1.2.3.5 times out before getting EHOSTUNREACH.) Here's the same on a patched system: lab:/home/barney $ ftp 1.2.3.4 ftp: connect: No route to host ftp> quit lab:/home/barney $ ftp 1.2.3.5 ftp: connect: Operation timed out ftp> quit Here are maillog entries, first from the unpatched system: Apr 13 20:58:26 mob sm-mta[76502]: h3E0wQZ3076500: to=, ctladdr= (202/1004), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30354, relay=bogus.no.such.domain. [1.2.3.4], dsn=4.0.0, stat=Deferred: Connection reset by bogus.no.such.domain. and the patched system: Apr 13 20:56:56 lab sm-mta[40480]: h3E0uunO040478: to=, ctladdr= (202/1004), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30355, relay=bogus.no.such.domain. [1.2.3.4], dsn=4.0.0, stat=Deferred: bogus.no.such.domain.: No route to host (In each case I put 1.2.3.4 bogus.no.such.domain in /etc/hosts.) Mike, I don't think this is a security issue - the client gets an instant SIGPIPE if it tries to write on the socket. I think telnet gets this. I did try traceroute, since it depends on time-exceeded. Worked fine. Barney -- Barney Wolff http://www.databus.com/bwresume.pdf I'm available by contract or FT, in the NYC metro area or via the 'Net.