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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 30 Nov 2015 18:06:27 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	David Miller <davem@...hat.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net] ipv4: igmp: Allow removing groups from a removed
 interface

On Mon, Nov 30, 2015 at 11:01:48AM -0500, David Miller wrote:
> From: Andrew Lunn <andrew@...n.ch>
> Date: Wed, 25 Nov 2015 21:15:36 +0100
> 
> > @@ -2126,7 +2126,7 @@ int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
> >  	ASSERT_RTNL();
> >  
> >  	in_dev = ip_mc_find_dev(net, imr);
> > -	if (!in_dev) {
> > +	if (!imr->imr_ifindex && !imr->imr_address.s_addr && !in_dev) {
> >  		ret = -ENODEV;
> >  		goto out;
> >  	}
> 
> Now, ip_mc_dec_group() below can take a NULL pointer dereference.  One example
> is if imr_ifindex is specified and the lookup returns NULL in ip_mc_find_dev().

Agreed. Earlier code had an if (in_dev) before the call to
ip_mc_dec_group(). It got removed along the way and now needs adding
back. A v2 patch will follow soon.
 
> This is so rediculously complicated, just looking at this code breaks something.

Yep. I think part of the problem comes from the code being designed
before interfaces were hot plugable.
--
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