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]
Date:   Sun, 19 May 2019 08:43:48 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Thomas Haller <thaller@...hat.com>,
        Hangbin Liu <liuhangbin@...il.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 4.9 41/51] fib_rules: return 0 directly if an exactly
 same rule exists when NLM_F_EXCL not supplied

On Wed, May 15, 2019 at 12:56:16PM +0200, Greg Kroah-Hartman wrote:
> From: Hangbin Liu <liuhangbin@...il.com>
> 
> [ Upstream commit e9919a24d3022f72bcadc407e73a6ef17093a849 ]
> 
> With commit 153380ec4b9 ("fib_rules: Added NLM_F_EXCL support to
> fib_nl_newrule") we now able to check if a rule already exists. But this
> only works with iproute2. For other tools like libnl, NetworkManager,
> it still could add duplicate rules with only NLM_F_CREATE flag, like
> 
> [localhost ~ ]# ip rule
> 0:      from all lookup local
> 32766:  from all lookup main
> 32767:  from all lookup default
> 100000: from 192.168.7.5 lookup 5
> 100000: from 192.168.7.5 lookup 5
> 
> As it doesn't make sense to create two duplicate rules, let's just return
> 0 if the rule exists.
> 
> Fixes: 153380ec4b9 ("fib_rules: Added NLM_F_EXCL support to fib_nl_newrule")
> Reported-by: Thomas Haller <thaller@...hat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
>  net/core/fib_rules.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> --- a/net/core/fib_rules.c
> +++ b/net/core/fib_rules.c
> @@ -429,9 +429,9 @@ int fib_nl_newrule(struct sk_buff *skb,
>  	if (rule->l3mdev && rule->table)
>  		goto errout_free;
>  
> -	if ((nlh->nlmsg_flags & NLM_F_EXCL) &&
> -	    rule_exists(ops, frh, tb, rule)) {
> -		err = -EEXIST;
> +	if (rule_exists(ops, frh, tb, rule)) {
> +		if (nlh->nlmsg_flags & NLM_F_EXCL)
> +			err = -EEXIST;
>  		goto errout_free;
>  	}
>  
> 
> 

Hi all,

This commit is causing issues on Android devices when Wi-Fi and mobile
data are both enabled. The device will do a soft reboot consistently.
So far, I've had reports on the Pixel 3 XL, OnePlus 6, Pocophone, and
Note 9 and I can reproduce on my OnePlus 6.

Sorry for taking so long to report this, I just figured out how to
reproduce it today and I didn't want to report it without that.

Attached is a full dmesg and the relevant snippet from Android's logcat.

Let me know what I can do to help debug,
Nathan

View attachment "dmesg.log" of type "text/plain" (166088 bytes)

View attachment "logcat.log" of type "text/plain" (8273 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ