aboutsummaryrefslogtreecommitdiffstats
path: root/security/safesetid
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2019-03-27 16:55:08 +0100
committerJames Morris <james.morris@microsoft.com>2019-04-10 10:29:50 -0700
commit0b9dc6c9f01c4a726558b82a3b6082a89d264eb5 (patch)
tree1acfa81de568fa53ee14fac6219a140cd6560778 /security/safesetid
parentsecurity: don't use RCU accessors for cred->session_keyring (diff)
downloadlinux-dev-0b9dc6c9f01c4a726558b82a3b6082a89d264eb5.tar.xz
linux-dev-0b9dc6c9f01c4a726558b82a3b6082a89d264eb5.zip
keys: safe concurrent user->{session,uid}_keyring access
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@google.com> Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'security/safesetid')
0 files changed, 0 insertions, 0 deletions