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: <c82adc57-fba3-f74c-a021-94d54dd52ac6@akamai.com>
Date:   Wed, 14 Feb 2018 11:41:36 -0500
From:   Vishwanath Pai <vpai@...mai.com>
To:     Eric Dumazet <eric.dumazet@...il.com>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Florian Westphal <fw@...len.de>
Cc:     netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] netfilter: xt_hashlimit: fix lock imbalance

On 02/12/2018 11:11 AM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
> 
> syszkaller found that rcu was not held in hashlimit_mt_common()
> 
> We only need to enable BH at this point.
> 
> Fixes: bea74641e378 ("netfilter: xt_hashlimit: add rate match mode")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: syzkaller <syzkaller@...glegroups.com>
> ---
>  net/netfilter/xt_hashlimit.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
> index ca6847403ca218c478d208080aab3e3c92a0a615..1fea48b4182f7cd5669b9c5e7100b2735cc590e7 100644
> --- a/net/netfilter/xt_hashlimit.c
> +++ b/net/netfilter/xt_hashlimit.c
> @@ -774,7 +774,7 @@ hashlimit_mt_common(const struct sk_buff *skb, struct xt_action_param *par,
>  		if (!dh->rateinfo.prev_window &&
>  		    (dh->rateinfo.current_rate <= dh->rateinfo.burst)) {
>  			spin_unlock(&dh->lock);
> -			rcu_read_unlock_bh();
> +			local_bh_enable();
>  			return !(cfg->mode & XT_HASHLIMIT_INVERT);
>  		} else {
>  			goto overlimit;
> 

Thanks for fixing this.

Acked-by: Vishwanath Pai <vpai@...mai.com>

-Vishwanath

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ