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]
Date:   Mon, 13 Nov 2017 10:37:10 -0700
From:   David Ahern <dsahern@...il.com>
To:     Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, jhs@...atatu.com, xiyou.wangcong@...il.com,
        mlxsw@...lanox.com, idosch@...lanox.com, edumazet@...gle.com,
        willemb@...gle.com, me@...in.cc, john.fastabend@...il.com,
        jakub.kicinski@...ronome.com, daniel@...earbox.net
Subject: Re: [patch net] net: forbid netdev used by mirred tc act from being
 moved to another netns

On 11/13/17 7:05 AM, Jiri Pirko wrote:
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 11596a3..877979f 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -8250,7 +8250,7 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
>  
>  	/* Don't allow namespace local devices to be moved. */
>  	err = -EINVAL;
> -	if (dev->features & NETIF_F_NETNS_LOCAL)
> +	if (dev->features & NETIF_F_NETNS_LOCAL || dev_netns_blocked(dev))
>  		goto out;
>  
>  	/* Ensure the device has been registrered */

Add the extack arg to dev_change_net_namespace and tell user why the
namespace change is not allowed. And for the netns_blocked case, EINVAL
does not seem the proper error code since the device is legit.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ