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] [day] [month] [year] [list]
Date: Thu, 6 Jun 2024 17:44:27 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Petr Malat <oss@...at.biz>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, davem@...emloft.net
Subject: Re: [PATCH] ip6mr: Fix lockdep and sparse RCU warnings

On Wed,  5 Jun 2024 21:53:55 +0200 Petr Malat wrote:
> ip6mr_vif_seq_start() must lock RCU even in a case of error, because
> stop callback is called unconditionally.
> 
> When IPV6_MROUTE_MULTIPLE_TABLES is enabled, calls to ip6mr_get_table
> should be done under RCU or RTNL lock. Lock RCU before the call unless
> it's done already or RTNL lock is held.

Patch does not apply, please rebase on:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
if its still legit.

And please add a Fixes tag, since its a fix.

> Signed-off-by: Petr Malat <oss@...at.biz>
> ---
>  net/ipv6/ip6mr.c | 52 +++++++++++++++++++++++++++++++-----------------
>  1 file changed, 34 insertions(+), 18 deletions(-)
> 
> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
> index cb0ee81a068a..bf6932535d6d 100644
> --- a/net/ipv6/ip6mr.c
> +++ b/net/ipv6/ip6mr.c
> @@ -411,13 +411,14 @@ static void *ip6mr_vif_seq_start(struct seq_file *seq, loff_t *pos)
>  	struct net *net = seq_file_net(seq);
>  	struct mr_table *mrt;
>  
> +	rcu_read_lock();
> +
>  	mrt = ip6mr_get_table(net, RT6_TABLE_DFLT);
>  	if (!mrt)
>  		return ERR_PTR(-ENOENT);

Double check for bugs like missing unlock, too...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ