Date: Wed, 28 Nov 2007 06:50:50 +0000 (UTC) From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: Nick Hilliard <nick-lists@netability.ie> Cc: freebsd-net@freebsd.org Subject: Re: tcp md5 checksums broken in 7.0-beta3 Message-ID: <20071128064738.S53707@maildrop.int.zabbadoz.net> In-Reply-To: <20071128062332.E53707@maildrop.int.zabbadoz.net> References: <474B24F3.2030603@netability.ie> <20071126224649.C53707@maildrop.int.zabbadoz.net> <474CC3EC.1010205@netability.ie> <20071128062332.E53707@maildrop.int.zabbadoz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 28 Nov 2007, Bjoern A. Zeeb wrote: > On Wed, 28 Nov 2007, Nick Hilliard wrote: > > Hi, > >> Bjoern A. Zeeb wrote: >>> I'll try to find your bug the next days (in case you find anything let >>> me know). >> >> At the very least, this will be necessary: >> >> --- tcp_subr.c~ 2007-11-28 01:14:46.000000000 +0000 >> +++ tcp_subr.c 2007-11-28 01:14:46.000000000 +0000 >> @@ -1948,7 +1948,7 @@ >> /* >> * Step 4: Update MD5 hash with shared secret. >> */ >> - MD5Update(&ctx, _KEYBUF(sav->key_auth), _KEYLEN(sav->key_auth)); >> + MD5Update(&ctx, sav->key_auth->key_data, _KEYLEN(sav->key_auth)); >> MD5Final(buf, &ctx); >> >> key_sa_recordxfer(sav, m); >> >> But it doesn't fix the problem. > > I stopped at the point validating the tcp header was correct last > night somewhen after midnight. With your + my other patches (not > posted yet) I have valid md5 sums again for all but the S/A case. > Expect a patch soonish. Ok. Last problem solved as well. foo# tcpdump -e -l -n -i lo0 -s 0 -M "aaaaaaaaaaaaaaaaaa" port 2345 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on lo0, link-type NULL (BSD loopback), capture size 65535 bytes 06:46:59.119952 AF IPv4 (2), length 84: 127.0.0.1.49991 > 127.0.0.1.2345: S 471076426:471076426(0) win 65535 <mss 16344,nop,wscale 3,sackOK,timestamp 673871 0,nop,nop,md5:valid> 06:46:59.119998 AF IPv4 (2), length 84: 127.0.0.1.2345 > 127.0.0.1.49991: S 2721608573:2721608573(0) ack 471076427 win 65535 <mss 16344,nop,wscale 3,nop,nop,timestamp 2331746037 673871,nop,nop,md5:valid> 06:46:59.120028 AF IPv4 (2), length 76: 127.0.0.1.49991 > 127.0.0.1.2345: . ack 1 win 8960 <nop,nop,timestamp 673871 2331746037,nop,nop,md5:valid> 06:46:59.120073 AF IPv4 (2), length 102: 127.0.0.1.49991 > 127.0.0.1.2345: P 1:27(26) ack 1 win 8960 <nop,nop,timestamp 673871 2331746037,nop,nop,md5:valid> 06:46:59.120103 AF IPv4 (2), length 76: 127.0.0.1.2345 > 127.0.0.1.49991: F 1:1(0) ack 27 win 8960 <nop,nop,timestamp 2331746038 673871,nop,nop,md5:valid> 06:46:59.120147 AF IPv4 (2), length 76: 127.0.0.1.49991 > 127.0.0.1.2345: . ack 2 win 8960 <nop,nop,timestamp 673872 2331746038,nop,nop,md5:valid> 06:46:59.120164 AF IPv4 (2), length 76: 127.0.0.1.49991 > 127.0.0.1.2345: F 27:27(0) ack 2 win 8960 <nop,nop,timestamp 673872 2331746038,nop,nop,md5:valid> 06:46:59.120208 AF IPv4 (2), length 56: 127.0.0.1.2345 > 127.0.0.1.49991: . ack 28 win 8959 <nop,nop,timestamp 2331746038 673872> I have the to have one part of the patch reviewed before I can send it out... Will try to catch people the next hours. -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT Software is harder than hardware so better get it right the first time.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071128064738.S53707>