Date: Fri, 21 Jan 2000 19:19:59 -0700 From: Wes Peters <wes@softweyr.com> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Matthew Dillon <dillon@apollo.backplane.com>, Alfred Perlstein <bright@wintelcom.net>, Brett Glass <brett@lariat.org>, security@freebsd.org Subject: Re: stream.c worst-case kernel paths Message-ID: <388913CF.DE7F4B0B@softweyr.com> References: <7192.948496931@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote: > > In message <200001212311.PAA64559@apollo.backplane.com>, Matthew Dillon writes: > > > No, this is far too dangerous. If a packet is bad due to being > > corrupted then you want to throw it away (via the checksum check) > > *BEFORE* you start messing around with the socket state. Otherwise > > a perfectly legitimate packet that got corrupted in transit may > > cause a disconnect or other failure. > > It makes a lot of sense to do cheap (relative to the checksum) > checks on the packet before we do the checksum, as long as we > don't modify any state before the checksum is validated. > > If it is cheaper to try to locate the pcb, than to calculate the > checksum, the locate the pcb first and drop the packet before > doing the checksum. Except you may get a false match on a garbled packet, that just happened to get garbled to match a different connection. The checksum is done first to avoid such situations. Until the packet has been verified good, none of the data in it can be trusted. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?388913CF.DE7F4B0B>