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-next>] [day] [month] [year] [list]
Date:	Mon, 11 May 2015 18:34:24 -0700
From:	Venkat Venkatsubra <venkat.x.venkatsubra@...cle.com>
To:	netdev@...r.kernel.org, xen-devel@...ts.xenproject.org
Cc:	davem@...emloft.net, david.vrabel@...rix.com,
	konrad.wilk@...cle.com, boris.ostrovsky@...cle.com,
	wei.liu2@...rix.com, paul.durrant@...rix.com
Subject: [PATCH] xen-netfront: reset skb transport header before checksum

In ed1f50c3a ("net: add skb_checksum_setup") some checksum functions
were introduced in core. Subsequent change b5cf66cd1 ("xen-netfront:
use new skb_checksum_setup function") made use of those functions to
replace its own implementation. With that change ip_hdr() and tcp_hdr()
were not pointing at the right place. d554f73df ("xen-netfront: reset
skb network header before checksum") fixed the ip_hdr().

This patch fixes tcp_hdr().

We saw this problem when LRO was enabled on the host and it results in
netfront setting skb->ip_summed to CHECKSUM_UNNECESSARY.

Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@...cle.com>
---
 drivers/net/xen-netfront.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 3f45afd..ed5c242 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -889,6 +889,7 @@ static int handle_incoming_queue(struct netfront_queue *queue,
 		/* Ethernet work: Delayed to here as it peeks the header. */
 		skb->protocol = eth_type_trans(skb, queue->info->netdev);
 		skb_reset_network_header(skb);
+		skb_set_transport_header(skb, ip_hdrlen(skb));
 
 		if (checksum_setup(queue->info->netdev, skb)) {
 			kfree_skb(skb);
-- 
1.8.2.1

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