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]
Date:   Tue, 19 May 2020 12:16:41 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     vinay.yadav@...lsio.com
Cc:     netdev@...r.kernel.org, kuba@...nel.org, secdev@...lsio.com
Subject: Re: [PATCH net-next] net/tls: fix race condition causing kernel
 panic

From: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
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:

	lock();
	x = p->y;
	unlock();

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ