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: <20231020184348.528aa62c@kernel.org>
Date: Fri, 20 Oct 2023 18:43:48 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Daniel Borkmann <daniel@...earbox.net>, bpf@...r.kernel.org,
 netdev@...r.kernel.org, martin.lau@...ux.dev, razor@...ckwall.org,
 ast@...nel.org, andrii@...nel.org, john.fastabend@...il.com,
 sdf@...gle.com, toke@...nel.org
Subject: Re: [PATCH bpf-next v2 1/7] netkit, bpf: Add bpf programmable net
 device

On Sat, 21 Oct 2023 00:18:53 +0200 Andrew Lunn wrote:
> > +	err = rtnl_configure_link(peer, ifmp, 0, NULL);
> > +	if (err < 0)
> > +		goto err_configure_peer;  
> 
> Seeing code after calling register_netdevice() often means bugs. The
> interface is live, and in use before the function even returns. The
> kernel can try to get an IP address, mount an NFS root etc. This might
> be safe, because you have two linked interfaces here, and the other
> one is not yet registered. Maybe some comment about this would be
> good, or can the rtnl_configure_link() be done earlier?

These are in the newlink callback, rtnl is held throughout.
Which is not to say that corresponding code in veth wasn't 
a source of many bugs :S

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ