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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 May 2019 12:24:15 +0200
From:   Sabrina Dubroca <sd@...asysnail.net>
To:     Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:     netdev@...r.kernel.org, Dan Winship <danw@...hat.com>
Subject: Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a
 link-netnsid

2019-05-14, 12:05:16 +0200, Nicolas Dichtel wrote:
> Le 14/05/2019 à 10:01, Sabrina Dubroca a écrit :
> > 2019-05-14, 09:32:32 +0200, Nicolas Dichtel wrote:
> [snip]
> >> What about this one?
> >> Fixes: d8a5ec672768 ("[NET]: netlink support for moving devices between network
> >> namespaces.")
> > 
> > Nice. Now I think the bug can't really trigger unless one of these
> > commits are present:
> > 
> > aa79e66eee5d ("net: Make ifindex generation per-net namespace")
> > 9c7dafbfab15 ("net: Allow to create links with given ifindex")
> > 
> I don't think so.
> 
> Please have a look to commit ce286d327341 ("[NET]: Implement network device
> movement between namespaces").
> In dev_change_net_namespace(), there is the following code:
> 
>        /* If there is an ifindex conflict assign a new one */
>        if (__dev_get_by_index(net, dev->ifindex)) {
>                int iflink = (dev->iflink == dev->ifindex);
>                dev->ifindex = dev_new_index(net);
>                if (iflink)
>                        dev->iflink = dev->ifindex;
>        }
> 
> This code may change the ifindex of an interface when this interface moves to
> another netns. This may happen even before the commits you propose, because the
> global ifindex counter can wrap around.

Yes, that's possible although quite unlikely. I'll go with d8a5ec672768.

-- 
Sabrina

Powered by blists - more mailing lists