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: <20231016120352.174fe1ee@kernel.org>
Date: Mon, 16 Oct 2023 12:03:52 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Daniel Gröber <dxld@...kboxed.org>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, netdev@...r.kernel.org, Richard Weinberger
 <richard@....at>, Serge Hallyn <serge.hallyn@...onical.com>, "Eric W.
 Biederman" <ebiederm@...ssion.com>
Subject: Re: [BUG] rtnl_newlink: Rogue MOVE event delivered on netns change

On Mon, 16 Oct 2023 19:20:26 +0200 Greg Kroah-Hartman wrote:
> > IIUC what happens is:
> > 
> >  - systemd controls "real" eth0
> >  - we move a "to be renamed" eth0 from a container into main ns
> >  - we rename "to be renamed" eth0 to something else
> >  - seeing the rename of eth0 system thinks it's the "real" one
> >    that is being renamed, ergo there's no eth0 any more,
> >    so it shuts down its "unit" for eth0
> > 
> > I don't think anything changed. Sounds more like someone finally tried
> > to use this in anger.  
> 
> Then they get to keep the broken pieces that they created here.
> "moving" a network connection to a container needs to either be added to
> systemd if it is going to manage the network connections, or just stop
> using systemd to handle the connection entirely as they want to do
> something that systemd doesn't support.
> 
> I don't think your proposed change is going to do much here as you would
> have multiple adds for the same device without any removes, which is
> odd.

We issue the ADD and REMOVE uevents explicitly.

If only we could have a form of device_rename() which does not generate
any uevent, everything should be perfectly sensible. We issue REMOVE in
the old namespace. Rejig the device including the silent rename. Issue
ADD for the new identity in the new namespace.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ