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]
Date:	Tue, 12 May 2015 14:05:40 -0400
From:	Vlad Yasevich <vyasevich@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>,
	Wolfgang Walter <linux@...m.de>
CC:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] Revert "ipv6: Allow for partial checksums on non-ufo
 packets"

On 05/08/2015 06:22 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
> 
> Wolfgang Walter reported crashes using traceroute6, root caused to this
> commit.
> 
> UDP packets can be sent from RAW sockets.
> 
> Note that the faulty commit addressed a non problem, as normal
> UDP v6 packets use udp_v6_send_skb() which correctly setup
> CHECKSUM_PARTIAL properly if device has the correct feature.

Actually, they didn't.  udp_v6_send_skb() uses ip_summed from
the skb, which is populated by __ip6_append_data.  That in turn
always set it CHECKSUM_NONE.

The code in question looks identically to that of __ip_append_data().
The problem is similar in both places.

-vlad
> 
> It seems not worth trying to 'fix' the raw path.
> 
> Fixes: 32dce968dd98 ("ipv6: Allow for partial checksums on non-ufo packets")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Wolfgang Walter <linux@...m.de>
> Cc: Vlad Yasevich <vyasevich@...il.com>
> ---
>  net/ipv6/ip6_output.c |   11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> index 7fde1f265c90..1fe5c687328e 100644
> --- a/net/ipv6/ip6_output.c
> +++ b/net/ipv6/ip6_output.c
> @@ -1218,7 +1218,6 @@ static int __ip6_append_data(struct sock *sk,
>  	u32 tskey = 0;
>  	struct rt6_info *rt = (struct rt6_info *)cork->dst;
>  	struct ipv6_txoptions *opt = v6_cork->opt;
> -	int csummode = CHECKSUM_NONE;
>  
>  	skb = skb_peek_tail(queue);
>  	if (!skb) {
> @@ -1275,14 +1274,6 @@ emsgsize:
>  			tskey = sk->sk_tskey++;
>  	}
>  
> -	/* If this is the first and only packet and device
> -	 * supports checksum offloading, let's use it.
> -	 */
> -	if (!skb && sk->sk_protocol == IPPROTO_UDP &&
> -	    length + fragheaderlen < mtu &&
> -	    rt->dst.dev->features & NETIF_F_V6_CSUM &&
> -	    !exthdrlen)
> -		csummode = CHECKSUM_PARTIAL;
>  	/*
>  	 * Let's try using as much space as possible.
>  	 * Use MTU if total length of the message fits into the MTU.
> @@ -1396,7 +1387,7 @@ alloc_new_skb:
>  			 *	Fill in the control structures
>  			 */
>  			skb->protocol = htons(ETH_P_IPV6);
> -			skb->ip_summed = csummode;
> +			skb->ip_summed = CHECKSUM_NONE;
>  			skb->csum = 0;
>  			/* reserve for fragmentation and ipsec header */
>  			skb_reserve(skb, hh_len + sizeof(struct frag_hdr) +
> 
> 

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