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: <20090805101005.6a02f0ae@nehalam>
Date:	Wed, 5 Aug 2009 10:10:05 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	ebiederm@...ssion.com (Eric W. Biederman)
Cc:	"Serge E. Hallyn" <serue@...ibm.com>,
	Linux Containers <containers@...ts.osdl.org>,
	Sachin Sant <sachinp@...ibm.com>,
	netdev <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>, matthltc@...ibm.com,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] veth: don't free priv->status until dev->destructor
 (v2)

On Tue, 04 Aug 2009 23:40:47 -0700
ebiederm@...ssion.com (Eric W. Biederman) wrote:

> Stephen Hemminger <shemminger@...tta.com> writes:
> 
> > On Fri, 26 Jun 2009 11:24:18 -0500
> > "Serge E. Hallyn" <serue@...ibm.com> wrote:
> >
> >> Based on the commit msg on ae0e8e82205c903978a79ebf5e31c670b61fa5b4, it looks
> >
> >>  	ether_setup(dev);
> >> @@ -306,7 +320,7 @@ static void veth_setup(struct net_device *dev)
> >>  	dev->netdev_ops = &veth_netdev_ops;
> >>  	dev->ethtool_ops = &veth_ethtool_ops;
> >>  	dev->features |= NETIF_F_LLTX;
> >> -	dev->destructor = free_netdev;
> >> +	dev->destructor = veth_dev_free;
> >>
> >
> > This is still going to oops if sysfs statistics referenced
> > after module unload because module is unloaded (code is gone)
> > and veth_dev_free no longer exists.
> 
> Has anyone actually seen that cause an oops?
> 
> The reason I am asking is that as I read the code we cannot have
> this problem.  At worst the destructor callback is delayed until:
> 
> veth_exit
>   rtnl_link_unregister
>     rtnl_unlock
>       netdev_run_todo
>         dev->destructor
> 
> 
> Similarly even if the sysfs filehandle is open we have called:
> 
> netdev_unregister_kobject
>   ...
>     sysfs_addrm_finish
>       sysfs_deactivate
> 
> Which guarantees that sysfs_get_active_two will fail and all
> subsequent actions on that file will fail.
> 
> Eric

Sysfs must be safer than it used to be. 
--
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