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  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:   Thu, 21 May 2020 11:56:23 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Vinay Kumar Yadav <vinay.yadav@...lsio.com>
Cc:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        secdev@...lsio.com
Subject: Re: [PATCH net-next] net/tls: fix race condition causing kernel
 panic

On Thu, 21 May 2020 14:28:27 +0530 Vinay Kumar Yadav wrote:
> Considering the lock in fix ("pending" is local variable), when writer reads
> pending == 0 [pending = atomic_read(&ctx->encrypt_pending); --> from tls_sw_sendmsg()],
> that means encrypt complete() [from tls_encrypt_done()] is already called.

Please indulge me with full sentences. I can't parse this.

> and if pending == 1 [pending = atomic_read(&ctx->encrypt_pending); --> from tls_sw_sendmsg()],
> that means writer is going to wait for atomic_dec_return(&ctx->decrypt_pending) and
> complete() [from tls_encrypt_done()]  to be called atomically.
> 
> This way, writer is not going to proceed to encrypt next record on CPU0 without complete().

Powered by blists - more mailing lists