diff --git a/security/keys/keyring.c b/security/keys/keyring.c index ed851574d07301ecc07f6920ffaee5be86635efd..3dba81c2eba360a615d9116e124cb36d86e89427 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -539,6 +539,9 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check) &keyring_name_hash[bucket], type_data.link ) { + if (keyring->user->user_ns != current_user_ns()) + continue; + if (test_bit(KEY_FLAG_REVOKED, &keyring->flags)) continue;