lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070119143228.GB3424@ff.dom.local>
Date:	Fri, 19 Jan 2007 15:32:28 +0100
From:	Jarek Poplawski <jarkao2@...pl>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	Michael Tokarev <mjt@....msk.ru>, netdev@...r.kernel.org,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH] tcp_output: Re: rare bad TCP checksum with 2.6.19?

On Fri, Jan 19, 2007 at 01:14:52PM +0100, Patrick McHardy wrote:
> Jarek Poplawski wrote:
> > Here is my patch proposal. If I'm not totally wrong,
> > there is a possibility that, during collapsing, empty
> > skb with FIN is added to "normal" packet and changes
> > its ip_summed field to CHECKSUM_NONE.
> > 
> > diff -Nurp linux-2.6.19-/net/ipv4/tcp_output.c linux-2.6.19/net/ipv4/tcp_output.c
> > --- linux-2.6.19-/net/ipv4/tcp_output.c	2006-11-29 22:57:37.000000000 +0100
> > +++ linux-2.6.19/net/ipv4/tcp_output.c	2007-01-19 07:58:39.000000000 +0100
> > @@ -1590,7 +1590,8 @@ static void tcp_retrans_try_collapse(str
> >  
> >  		memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
> >  
> > -		skb->ip_summed = next_skb->ip_summed;
> > +		if (next_skb->ip_summed == CHECKSUM_PARTIAL)
> > +			skb->ip_summed = CHECKSUM_PARTIAL;
> >  
> >  		if (skb->ip_summed != CHECKSUM_PARTIAL)
> >  			skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size);
> > 
> 
> I noticed this too, but I can't see how it could lead to
> a partial checksum on the wire since the checksumming is
> done after changing ip_summed to CHECKSUM_NONE. Is this
> patch verified to fix Michael's problem?

No, this was intended as a proposal for testing.
I didn't verify all the checksum path here, but I
guessed such change during the summing could matter
(probably for skb_copy_and_csum_dev and maybe earlier)
and I couldn't find more suspicious change since 2.6.17
near this FINs. But if it really works, it shoudn't be
so hard to verify the mechanism, I hope.

Jarek P.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ