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: <Y+9hmmAlHOo4yX9Q@debian>
Date:   Fri, 17 Feb 2023 12:14:34 +0100
From:   Guillaume Nault <gnault@...hat.com>
To:     Shigeru Yoshida <syoshida@...hat.com>
Cc:     jchapman@...alix.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Cong Wang <cong.wang@...edance.com>
Subject: Re: [PATCH net v3] l2tp: Avoid possible recursive deadlock in
 l2tp_tunnel_register()

On Fri, Feb 17, 2023 at 01:37:10AM +0900, Shigeru Yoshida wrote:
> @@ -840,8 +850,7 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
>  	}
>  	if (drop_refcnt)
>  		l2tp_session_dec_refcount(session);
> -	if (drop_tunnel)
> -		l2tp_tunnel_dec_refcount(tunnel);
> +	l2tp_tunnel_dec_refcount(tunnel);
>  	release_sock(sk);
>  
>  	return error;

The l2tp_tunnel_dec_refcount() call could be done after release_sock(),
to make the code more logical (as the refcount is now taken before
lock_sock()). Anyway, that shouldn't be a problem and I don't want to
delay this fix any longer.

Reviewed-by: Guillaume Nault <gnault@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ