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: <aaa7e53a-47bc-14b8-3598-3b2f4bf2f83c@gmail.com>
Date:   Sun, 17 Jun 2018 12:58:44 -0600
From:   David Ahern <dsahern@...il.com>
To:     Kirill Tkhai <ktkhai@...tuozzo.com>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, daniel@...earbox.net,
        jakub.kicinski@...ronome.com, ast@...nel.org,
        linux@...musvillemoes.dk, john.fastabend@...il.com,
        brouer@...hat.com
Subject: Re: [PATCH] net: Fix device name resolving crash in
 default_device_exit()

On 6/15/18 3:44 AM, Kirill Tkhai wrote:
> Hm, but is this a likely case, when real device is moved to net ns, so it
> requires moving to init_net back? It seems the most devices moved to !init_net
> are virtual and they just destroyed in default_device_exit_batch(). Or we have
> more devices to care here?
> 
> I don't much want to insert here something like below:
> 
> 	if (__dev_get_by_name(&init_net, dev->name))
> 		snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex);
> 	err = dev_change_net_namespace(dev, &init_net, "dev%d");
> 
> because dev_change_net_namespace() is generic interface and it's used not only here,
> and this will crumble the code in corner cases.
> 
> Maybe you have better ideas about this?

There are a lot of use cases these days (e.g., switch NOS) with 1000's
(10's of 1000's) of netdevices. On top of that support for port netdevs
in a namespace to create virtual switches needs to happen (and I suspect
will happen in the next few years). That becomes one example where
netdevices representing physical ports can be pushed back to init_net.

That said, not many easy options at the moment for the bug you are fixing.

Further, panic'ing a node because the move back to init_net fails is
just wrong.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ