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: <20100106091007.3fcc7d9b@nehalam>
Date:	Wed, 6 Jan 2010 09:10:07 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	paulmck@...ux.vnet.ibm.com
Cc:	Flavio Leitner <fleitner@...hat.com>, netdev@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	David Stevens <dlstevens@...ibm.com>,
	Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH] igmp: fix ip_mc_sf_allow race [v3]

On Wed, 6 Jan 2010 08:40:27 -0800
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> wrote:

> > -	if (inet->mc_list == NULL)
> > +	rcu_read_lock();
> > +	if (rcu_dereference(inet->mc_list) == NULL) {
> > +		rcu_read_unlock();
> >  		return;
> > +	}
> > +	rcu_read_unlock();  
> 
> I don't understand what rcu_read_lock() is protecting here.  The
> test is still unstable -- just after finding inet->mc_list non-NULL,
> ip_mc_leave_group() might cause it to become NULL.
> 
> Is there a need to protect sock_net(sk)?  (I don't believe so, but then
> again, I don't claim to understand locking in Linux networking.)
> If there is no need, it should be possible to drop the rcu_read_lock(),
> rcu_read_unlock(), and rcu_dereference() above.  (You might want them
> for documentation purposes, as they aren't hurting anything, just
> wondering what the intent is.)

I think code is trying to avoid looking at mc_list if no multicast
addresses. But it is an unsafe check.

If mc_list was just converted to list_head this would all be clearer
--
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