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:   Tue, 19 May 2020 12:16:41 -0700 (PDT)
From:   David Miller <>
Subject: Re: [PATCH net-next] net/tls: fix race condition causing kernel

From: Vinay Kumar Yadav <>
Date: Tue, 19 May 2020 13:13:27 +0530

> +		spin_lock_bh(&ctx->encrypt_compl_lock);
> +		pending = atomic_read(&ctx->encrypt_pending);
> +		spin_unlock_bh(&ctx->encrypt_compl_lock);

The sequence:

	x = p->y;

Does not fix anything, and is superfluous locking.

The value of p->y can change right after the unlock() call, so you
aren't protecting the atomic'ness of the read and test sequence
because the test is outside of the lock.

Powered by blists - more mailing lists