[PATCH] keys: safe concurrent user->{session,uid}_keyring access

James Morris jmorris at namei.org
Wed Apr 10 17:31:01 UTC 2019


On Wed, 27 Mar 2019, Jann Horn wrote:

> The current code can perform concurrent updates and reads on
> user->session_keyring and user->uid_keyring. Add a comment to
> struct user_struct to document the nontrivial locking semantics, and use
> READ_ONCE() for unlocked readers and smp_store_release() for writers to
> prevent memory ordering issues.
> 
> Fixes: 69664cf16af4 ("keys: don't generate user and user session keyrings unless they're accessed")
> Signed-off-by: Jann Horn <jannh at google.com>

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general


-- 
James Morris
<jmorris at namei.org>



More information about the Linux-security-module-archive mailing list