alistair23-linux/security/keys
Jann Horn 0b9dc6c9f0 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: 69664cf16a ("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>
2019-04-10 10:29:50 -07:00
..
encrypted-keys encrypted-keys: fix Opt_err/Opt_error = -1 2019-02-04 17:36:01 -05:00
big_key.c
compat.c KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2] 2018-10-26 09:30:46 +01:00
compat_dh.c
dh.c Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name" 2018-09-25 13:28:58 +02:00
gc.c security: audit and remove any unnecessary uses of module.h 2018-12-12 14:58:51 -08:00
internal.h keys: Fix dependency loop between construction record and auth key 2019-02-15 14:12:09 -08:00
Kconfig
key.c keys: Timestamp new keys 2019-02-15 14:12:09 -08:00
keyctl.c Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-03-07 11:44:01 -08:00
keyctl_pkey.c KEYS: fix parsing invalid pkey info string 2019-01-01 13:13:19 -08:00
keyring.c Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-03-07 11:44:01 -08:00
Makefile KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2] 2018-10-26 09:30:46 +01:00
permission.c security: audit and remove any unnecessary uses of module.h 2018-12-12 14:58:51 -08:00
persistent.c
proc.c KEYS: always initialize keyring_index_key::desc_len 2019-02-22 10:11:34 -08:00
process_keys.c keys: safe concurrent user->{session,uid}_keyring access 2019-04-10 10:29:50 -07:00
request_key.c keys: safe concurrent user->{session,uid}_keyring access 2019-04-10 10:29:50 -07:00
request_key_auth.c KEYS: always initialize keyring_index_key::desc_len 2019-02-22 10:11:34 -08:00
sysctl.c
trusted.c tpm: pass an array of tpm_extend_digest structures to tpm_pcr_extend() 2019-02-13 09:48:52 +02:00
user_defined.c security: audit and remove any unnecessary uses of module.h 2018-12-12 14:58:51 -08:00