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: <1342514913.2626.277.camel@edumazet-glaptop>
Date:	Tue, 17 Jul 2012 10:48:33 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Zhong Hongbo <hongbo.zhong@...driver.com>
Cc:	Andy Cress <andy.cress@...kontron.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/4] pch_gbe: Fix the checksum fill to the error
 location

On Tue, 2012-07-17 at 16:04 +0800, Zhong Hongbo wrote:

> Hi Eric,
> 
> When forwarding network packages at the network layer, the variable
> value of skb->transport_header is unknown. In my test, the variable
> value of skb->transport_header is equal to skb->network_header. So
> When you count the checksum as following:
> 
> offset = skb_transport_offset(skb);
> 
> skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
> We should only count the TCP checksum, But it maybe include IP part.
> 
> tcp_hdr(skb)->check = csum_tcpudp_magic(iph->saddr, iph->daddr,
> skb->len - offset, IPPROTO_TCP, skb->csum);
> We should fill the checksum in TCP package, But maybe fill it in other
> location and cover the useful information, such as source ip.
> 
> So We should count the TCP checksum and fill it in the correct
> location. Or else the forwarding network package will be drop for the
> error checksum.
> 



So maybe you should instead test 

if (skb->ip_summed == CHECKSUM_PARTIAL) {
	...
	skb_checksum_start_offset(skb); /* is valid */
}


--
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