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: <1384456418.13941.40.camel@jlt4.sipsolutions.net>
Date:	Thu, 14 Nov 2013 20:13:38 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Dave Jones <davej@...hat.com>, David Miller <davem@...emloft.net>,
	netdev@...r.kernel.org, Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH] net-tcp: fix panic in tcp_fastopen_cache_set()

On Wed, 2013-11-13 at 15:00 -0800, Eric Dumazet wrote:

> --- a/net/ipv4/tcp_metrics.c
> +++ b/net/ipv4/tcp_metrics.c
> @@ -663,10 +663,13 @@ void tcp_fastopen_cache_get(struct sock *sk, u16 *mss,
>  void tcp_fastopen_cache_set(struct sock *sk, u16 mss,
>  			    struct tcp_fastopen_cookie *cookie, bool syn_lost)
>  {
> +	struct dst_entry *dst = __sk_dst_get(sk);
>  	struct tcp_metrics_block *tm;
>  
> +	if (!dst)
> +		return;
>  	rcu_read_lock();
> -	tm = tcp_get_metrics(sk, __sk_dst_get(sk), true);

Doesn't that __sk_dst_get() have to go inside the rcu_read_lock()?

Then again, I guess we hold the socket. Still looks a bit weird to be
moving it out.

johannes

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