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: <20250205234539.52299-1-kuniyu@amazon.com>
Date: Thu, 6 Feb 2025 08:45:39 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <nicolas.dichtel@...nd.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <horms@...nel.org>,
	<kuba@...nel.org>, <kuniyu@...zon.com>, <netdev@...r.kernel.org>,
	<pabeni@...hat.com>, <razor@...ckwall.org>, <stable@...r.kernel.org>
Subject: Re: [PATCH net] rtnetlink: fix netns leak with rtnl_setlink()

From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Date: Wed,  5 Feb 2025 23:10:37 +0100
> A call to rtnl_nets_destroy() is needed to release references taken on
> netns put in rtnl_nets.
> 
> CC: stable@...r.kernel.org
> Fixes: 636af13f213b ("rtnetlink: Register rtnl_dellink() and rtnl_setlink() with RTNL_FLAG_DOIT_PERNET_WIP.")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>

Thanks!


> ---
>  net/core/rtnetlink.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 1f4d4b5570ab..d1e559fce918 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -3432,6 +3432,7 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh,
>  		err = -ENODEV;
>  
>  	rtnl_nets_unlock(&rtnl_nets);
> +	rtnl_nets_destroy(&rtnl_nets);
>  errout:
>  	return err;
>  }
> -- 
> 2.47.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ