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: <20140409.130111.1002891296248446198.davem@davemloft.net>
Date:	Wed, 09 Apr 2014 13:01:11 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	kys@...rosoft.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
	jasowang@...hat.com
Subject: Re: [PATCH net 3/3] Drivers: net: hyperv: Address UDP checksum
 issues

From: "K. Y. Srinivasan" <kys@...rosoft.com>
Date: Tue,  8 Apr 2014 12:46:11 -0700

>  	} else if (net_trans_info & INFO_UDP) {
> -		csum_info->transmit.udp_checksum = 1;
> +		/* UDP checksum offload is not supported on ws2008r2.
> +		 * Furthermore, on ws2012 and ws2012r2, there are some
> +		 * issues with udp checksum offload from Linux guests.
> +		 * (these are host issues).
> +		 * For now compute the checksum here.
> +		 */
> +		struct udphdr *uh = udp_hdr(skb);
> +		u16 udp_len = ntohs(uh->len);
> +
> +		uh->check = 0;
> +		uh->check = csum_tcpudp_magic(ip_hdr(skb)->saddr,
> +					      ip_hdr(skb)->daddr,
> +					      udp_len, IPPROTO_UDP,
> +					      csum_partial(uh, udp_len, 0));
> +		if (uh->check == 0)
> +			uh->check = CSUM_MANGLED_0;
> +
> +		csum_info->transmit.udp_checksum = 0;

You absolutely cannot mangle packet header contents without first
COW'ing the SKB to make sure it's writable.

Otherwise network taps like tcpdump, and any other entity with a reference
to the packet, can see inconsistent state.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ