WSL2-Linux-Kernel/fs/crypto
Eric Biggers 4bcf6f827a fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref()
It is a bug for fscrypt_put_master_key_activeref() to see a NULL
keyring.  But it used to be possible due to the bug, now fixed, where
fscrypt_destroy_keyring() was called before security_sb_delete().  To be
consistent with how fscrypt_destroy_keyring() uses WARN_ON for the same
issue, WARN and leak the fscrypt_master_key if the keyring is NULL
instead of dereferencing the NULL pointer.

This is a robustness improvement, not a fix.

Link: https://lore.kernel.org/r/20230313221231.272498-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-03-18 21:08:03 -07:00
..
Kconfig fscrypt: relax Kconfig dependencies for crypto API algorithms 2021-04-22 17:31:32 +10:00
Makefile fscrypt: add inline encryption support 2020-07-08 10:29:30 -07:00
bio.c fscrypt: support decrypting data from large folios 2023-01-28 15:10:12 -08:00
crypto.c fscrypt: support decrypting data from large folios 2023-01-28 15:10:12 -08:00
fname.c fscrypt: export fscrypt_fname_encrypt and fscrypt_fname_encrypted_size 2022-08-03 00:54:11 +02:00
fscrypt_private.h fscrypt: clean up fscrypt_add_test_dummy_key() 2023-02-07 22:30:30 -08:00
hkdf.c fscrypt: allow 256-bit master keys with AES-256-XTS 2021-09-22 11:29:38 -07:00
hooks.c fscrypt: stop using keyrings subsystem for fscrypt_master_key 2022-09-21 20:33:06 -07:00
inline_crypt.c blk-crypto: add a blk_crypto_config_supported_natively helper 2022-11-21 11:39:05 -07:00
keyring.c fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref() 2023-03-18 21:08:03 -07:00
keysetup.c fscrypt: clean up fscrypt_add_test_dummy_key() 2023-02-07 22:30:30 -08:00
keysetup_v1.c fscrypt: stop holding extra request_queue references 2022-09-21 20:33:06 -07:00
policy.c fscrypt updates for 6.3 2023-02-20 12:29:27 -08:00