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-next>] [day] [month] [year] [list]
Date:	Tue, 25 Nov 2008 09:40:59 -0800
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Daniel Lezcano <dlezcano@...ibm.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	benjamin.thery@...l.net, containers@...ts.osdl.org
Subject: Re: [patch 1/1] netns: filter out uevent not belonging to init_net

Daniel Lezcano <dlezcano@...ibm.com> writes:

> This patch will filter out the uevent not related to the init_net.
> Without this patch if a network device is created in a network
> namespace with the same name as one network device belonging to the
> initial network namespace (eg. eth0), when the network namespace
> will die and the network device will be destroyed, an event will
> be sent and catched by the udevd daemon. That will result to have
> the real network device to be shutdown because the udevd/uevent are
> not namespace aware.

It is belt and suspenders at this point.  As those devices should
not even be in sysfs at the moment.  But it keeps us from doing the
wrong thing when sysfs support starts coming on line.

Acked-by: "Eric W. Biederman" <ebiederm@...ssion.com>

> Signed-off-by: Daniel Lezcano <dlezcano@...ibm.com>
> ---
>  net/core/net-sysfs.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> Index: net-next-2.6/net/core/net-sysfs.c
> ===================================================================
> --- net-next-2.6.orig/net/core/net-sysfs.c
> +++ net-next-2.6/net/core/net-sysfs.c
> @@ -427,6 +427,9 @@ static int netdev_uevent(struct device *
>  	struct net_device *dev = to_net_dev(d);
>  	int retval;
>  
> +	if (!net_eq(dev_net(dev), &init_net))
> +		return 0;
> +
>  	/* pass interface to uevent. */
>  	retval = add_uevent_var(env, "INTERFACE=%s", dev->name);
>  	if (retval)
--
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