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: <1288206172.2658.11.camel@edumazet-laptop>
Date:	Wed, 27 Oct 2010 21:02:52 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Pavel Emelyanov <xemul@...allels.com>
Cc:	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH] tunnels: Fix tunnels change rcu protection

Le mercredi 27 octobre 2010 à 19:43 +0400, Pavel Emelyanov a écrit :
> After making rcu protection for tunnels (ipip, gre, sit and ip6) a bug
> was introduced into the SIOCCHGTUNNEL code.
> 
> The tunnel is first unlinked, then addresses change, then it is linked
> back probably into another bucket. But while changing the parms, the
> hash table is unlocked to readers and they can lookup the improper tunnel.
> 
> Respective commits are b7285b79 (ipip: get rid of ipip_lock), 1507850b
> (gre: get rid of ipgre_lock), 3a43be3c (sit: get rid of ipip6_lock) and
> 94767632 (ip6tnl: get rid of ip6_tnl_lock).
> 
> The quick fix is to wait for quiescent state to pass after unlinking,
> but if it is inappropriate I can invent something better, just let me
> know.
> 
> Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>

Good catch, I missed a change was possible at all :(

I guess some setups could scream with this fix, since this adds a
synchronize_net() call while holding RTNL ...

Hmm, maybe we should allocate a "struct ip_tunnel_parm" instead of using
an embedded one (in struct ip_tunnel), and stick an rcu_head in it to
delay its freeing...




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