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: <20140625.174214.1193347044692011852.davem@davemloft.net>
Date:	Wed, 25 Jun 2014 17:42:14 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	dormando@...ia.net, preobr@...gle.com,
	steffen.klassert@...unet.com, paulmck@...ux.vnet.ibm.com,
	netdev@...r.kernel.org, kcc@...gle.com, dvyukov@...gle.com,
	larsbull@...gle.com, edumazet@...gle.com, brutus@...gle.com,
	maze@...gle.com, alexei.starovoitov@...il.com
Subject: Re: [PATCH net] ipv4: fix dst race in sk_dst_get()

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 24 Jun 2014 10:05:11 -0700

> From: Eric Dumazet <edumazet@...gle.com>
> 
> When IP route cache had been removed in linux-3.6, we broke assumption
> that dst entries were all freed after rcu grace period. DST_NOCACHE
> dst were supposed to be freed from dst_release(). But it appears
> we want to keep such dst around, either in UDP sockets or tunnels.
> 
> In sk_dst_get() we need to make sure dst refcount is not 0
> before incrementing it, or else we might end up freeing a dst
> twice.
> 
> DST_NOCACHE set on a dst does not mean this dst can not be attached
> to a socket or a tunnel.
> 
> Then, before actual freeing, we need to observe a rcu grace period
> to make sure all other cpus can catch the fact the dst is no longer
> usable.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Dormando <dormando@...ia.net>

Applied and queued up for -stable, thanks Eric.
--
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