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: <20220121081311.2518068f@hermes.local>
Date:   Fri, 21 Jan 2022 08:13:11 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     ycaibb <ycaibb@...il.com>
Cc:     davem@...emloft.net, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
        kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: missing lock releases in ipmr_base.c

On Fri, 21 Jan 2022 11:22:10 +0800
ycaibb <ycaibb@...il.com> wrote:

> From: Ryan Cai <ycaibb@...il.com>
> 
> In method mr_mfc_seq_idx, the lock it->lock and rcu_read_lock are not released when pos-- == 0 is true.
> 
> Signed-off-by: Ryan Cai <ycaibb@...il.com>
> ---
>  net/ipv4/ipmr_base.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/ipv4/ipmr_base.c b/net/ipv4/ipmr_base.c
> index aa8738a91210..c4a247024c85 100644
> --- a/net/ipv4/ipmr_base.c
> +++ b/net/ipv4/ipmr_base.c
> @@ -154,6 +154,7 @@ void *mr_mfc_seq_idx(struct net *net,
>  	it->cache = &mrt->mfc_cache_list;
>  	list_for_each_entry_rcu(mfc, &mrt->mfc_cache_list, list)
>  		if (pos-- == 0)
> +			rcu_read_unlock();
>  			return mfc;
>  	rcu_read_unlock();
>  
> @@ -161,6 +162,7 @@ void *mr_mfc_seq_idx(struct net *net,
>  	it->cache = &mrt->mfc_unres_queue;
>  	list_for_each_entry(mfc, it->cache, list)
>  		if (pos-- == 0)
> +			spin_unlock_bh(it->lock);
>  			return mfc;
>  	spin_unlock_bh(it->lock);
>  

Another buggy patch, perhaps you write python or research papers?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ