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: <6498f7f5-b3cb-2d86-b0dc-ebd807948c3b@virtuozzo.com>
Date:   Mon, 24 Dec 2018 12:35:18 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     Aditya Pakki <pakki001@....edu>
Cc:     kjlu@....edu, "David S. Miller" <davem@...emloft.net>,
        Andrei Vagin <avagin@...tuozzo.com>,
        Tyler Hicks <tyhicks@...onical.com>,
        Matthew Wilcox <willy@...radead.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/net_namespace: Check the return value of
 register_pernet_subsys()

On 24.12.2018 04:42, Aditya Pakki wrote:
> In net_ns_init(), register_pernet_subsys() could fail while registering
> network namespace subsystems. The fix checks the return value and
> sends a panic() on failure.
> 
> Signed-off-by: Aditya Pakki <pakki001@....edu>

Reviewed-by: Kirill Tkhai <ktkhai@...tuozzo.com>

> ---
>  net/core/net_namespace.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
> index fefe72774aeb..af8849a7a9c3 100644
> --- a/net/core/net_namespace.c
> +++ b/net/core/net_namespace.c
> @@ -917,7 +917,8 @@ static int __init net_ns_init(void)
>  	init_net_initialized = true;
>  	up_write(&pernet_ops_rwsem);
>  
> -	register_pernet_subsys(&net_ns_ops);
> +	if (register_pernet_subsys(&net_ns_ops))
> +		panic("Could not register network namespace subsystems");
>  
>  	rtnl_register(PF_UNSPEC, RTM_NEWNSID, rtnl_net_newid, NULL,
>  		      RTNL_FLAG_DOIT_UNLOCKED);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ