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: <c5f89148-0d0a-f81c-5d0d-b631c36196ca@gmail.com>
Date:   Wed, 3 Apr 2019 20:51:53 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Li RongQing <lirongqing@...du.com>, ralf@...ux-mips.org,
        linux-hams@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] net: ax25: replace bh_lock_sock with lock_sock_fast in
 ax25_rt_autobind



On 04/03/2019 05:51 PM, Li RongQing wrote:
> ax25_rt_autobind is always called in user context, so lock_sock_fast
> should be used, and bh_lock_sock should only be used in BH context
> this replacement fixes a possible deadlock
> 


> 
> Reported-by: syzbot+e350b81e95a6a214da8a@...kaller.appspotmail.com
> Signed-off-by: Li RongQing <lirongqing@...du.com>
> ---
>  net/ax25/ax25_route.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
> index 66f74c85cf6b..28e21259ff08 100644
> --- a/net/ax25/ax25_route.c
> +++ b/net/ax25/ax25_route.c
> @@ -429,9 +429,11 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
>  	}
>  
>  	if (ax25->sk != NULL) {
> -		bh_lock_sock(ax25->sk);
> +		bool slow;
> +
> +		slow = lock_sock_fast(ax25->sk);
>  		sock_reset_flag(ax25->sk, SOCK_ZAPPED);
> -		bh_unlock_sock(ax25->sk);
> +		unlock_sock_fast(ax25->sk, slow);
>  	}
>  
>  put:
> 

How have you tested this patch exactly ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ