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: <36c2a487-4f74-4be3-af66-0dadd1538c64@redhat.com>
Date: Wed, 16 Apr 2025 17:17:13 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
 "David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuni1840@...il.com>,
 netdev@...r.kernel.org
Subject: Re: [PATCH RESEND v2 net-next 13/14] ipv6: Protect nh->f6i_list with
 spinlock and flag.

On 4/14/25 8:15 PM, Kuniyuki Iwashima wrote:
> @@ -1498,7 +1504,23 @@ int fib6_add(struct fib6_node *root, struct fib6_info *rt,
>  	}
>  #endif
>  
> -	err = fib6_add_rt2node(fn, rt, info, extack, &purge_list);
> +	if (rt->nh) {
> +		spin_lock(&rt->nh->lock);
> +
> +		if (rt->nh->dead) {
> +			NL_SET_ERR_MSG(extack, "Nexthop has been deleted");
> +			err = -EINVAL;
> +		} else {
> +			err = fib6_add_rt2node(fn, rt, info, extack, &purge_list);
> +			if (!err)
> +				list_add(&rt->nh_list, &rt->nh->f6i_list);
> +		}

Maybe move the new check and list_add inside fib6_add_rt2node() or
bundle all the above in a new helper?

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ