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]
Date:	Tue, 24 Mar 2015 18:06:28 +0100
From:	Jiri Benc <jbenc@...hat.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, maheshb@...gle.com, dcbw@...hat.com
Subject: Re: [PATCH net] ipvlan: fix addr hash list corruption

On Tue, 24 Mar 2015 13:00:37 -0400 (EDT), David Miller wrote:
> From: Jiri Benc <jbenc@...hat.com>
> Date: Mon, 23 Mar 2015 22:10:19 +0100
> 
> > @@ -504,7 +504,8 @@ static void ipvlan_link_delete(struct net_device *dev, struct list_head *head)
> >  
> >  	if (ipvlan->ipv6cnt > 0 || ipvlan->ipv4cnt > 0) {
> >  		list_for_each_entry_safe(addr, next, &ipvlan->addrs, anode) {
> > -			ipvlan_ht_addr_del(addr, !dev->dismantle);
> > +			if (netif_running(dev))
> > +				ipvlan_ht_addr_del(addr, !dev->dismantle);
> >  			list_del_rcu(&addr->anode);
> >  		}
> >  	}
> 
> This is so error prone, because you are depending upon so many implementation
> details to infer a boolean state "is this address hashed".
> 
> So just add the boolean state to struct ipvl_addr, and manage it in
> the ipvlan_ht_addr_{add,del}() code.

I had that originally but then decided to go with smaller memory
footprint. Which obviously doesn't matter much here. I'll send v2 with
the boolean state.

 Jiri

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