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: <20140908.142143.807176983873922125.davem@davemloft.net>
Date:	Mon, 08 Sep 2014 14:21:43 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	therbert@...gle.com, alexander.h.duyck@...el.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] tcp: remove dst refcount false sharing for
 prequeue mode

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Mon, 08 Sep 2014 08:06:07 -0700

> @@ -1559,7 +1559,17 @@ bool tcp_prequeue(struct sock *sk, struct sk_buff *skb)
>  	    skb_queue_len(&tp->ucopy.prequeue) == 0)
>  		return false;
>  
> -	skb_dst_force(skb);
> +	/* Before escaping RCU protected region, we need to take care of skb
> +	 * dst. Prequeue is only enabled for established sockets.
> +	 * For such sockets, we might need the skb dst only to set sk->sk_rx_dst
> +	 * Instead of doing full sk_rx_dst validity here, let's perform
> +	 * an optimistic check.
> +	 */
> +	if (likely(sk->sk_rx_dst))
> +		skb_dst_drop(skb);
> +	else
> +		skb_dst_force(skb);
> +

This might not be a strong enough test.

We have to also make all of the checks that would cause the input
path to invalidate sk->sk_rx_dst too.

Otherwise, if it does, we'll crash when we try to do a dst_hold()
on skb_dst(skb) in sk->sk_rx_dst_set().
--
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