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] [day] [month] [year] [list]
Message-ID: <YHW2zwdoDLVRPB/6@horizon.localdomain>
Date:   Tue, 13 Apr 2021 12:20:47 -0300
From:   Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
To:     Or Cohen <orcohen@...oaltonetworks.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        vyasevich@...il.com, nhorman@...driver.com, davem@...emloft.net,
        kuba@...nel.org, linux-sctp@...r.kernel.org, lucien.xin@...il.com,
        nmarkus@...oaltonetworks.com
Subject: Re: [PATCH] net/sctp: fix race condition in sctp_destroy_sock

On Tue, Apr 13, 2021 at 12:31:53PM +0300, Or Cohen wrote:
> +++ b/net/sctp/socket.c
> @@ -1520,11 +1520,9 @@ static void sctp_close(struct sock *sk, long timeout)
>  
>  	/* Supposedly, no process has access to the socket, but
>  	 * the net layers still may.
> -	 * Also, sctp_destroy_sock() needs to be called with addr_wq_lock
> -	 * held and that should be grabbed before socket lock.
>  	 */

Please also update the following comment in sctp_init_sock():
          /* Nothing can fail after this block, otherwise
           * sctp_destroy_sock() will be called without addr_wq_lock held
           */

Other than this, LGTM. Thanks.

  Marcelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ