Date: Sun, 13 Apr 2003 21:15:31 -0400 From: Barney Wolff <barney@pit.databus.com> To: Mike Silbersack <silby@silby.com> Cc: net@freebsd.org Subject: Re: connect(2) behavior with unreacheable hosts Message-ID: <20030414011530.GA80964@pit.databus.com> In-Reply-To: <20030413142156.O44423@odysseus.silby.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>
next in thread | previous in thread | raw e-mail | index | archive | help
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=<nemo@bogus.no.such.domain>, ctladdr=<barney@mob.databus.com> (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=<nemo@bogus.no.such.domain>, ctladdr=<barney@lab.databus.com> (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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030414011530.GA80964>