linux/fs/crypto
Eric Biggers 968dd6d0c6 fscrypt: fix race allowing rename() and link() of ciphertext dentries
Close some race conditions where fscrypt allowed rename() and link() on
ciphertext dentries that had been looked up just prior to the key being
concurrently added.  It's better to return -ENOKEY in this case.

This avoids doing the nonsensical thing of encrypting the names a second
time when searching for the actual on-disk dir entries.  It also
guarantees that DCACHE_ENCRYPTED_NAME dentries are never rename()d, so
the dcache won't have support all possible combinations of moving
DCACHE_ENCRYPTED_NAME around during __d_move().

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-17 09:51:20 -04:00
..
bio.c fscrypt: remove WARN_ON_ONCE() when decryption fails 2019-04-16 18:44:44 -04:00
crypto.c fscrypt: clean up and improve dentry revalidation 2019-04-17 09:48:46 -04:00
fname.c fscrypt: use READ_ONCE() to access ->i_crypt_info 2019-04-16 18:57:09 -04:00
fscrypt_private.h fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
hooks.c fscrypt: fix race allowing rename() and link() of ciphertext dentries 2019-04-17 09:51:20 -04:00
Kconfig fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
keyinfo.c fscrypt: use READ_ONCE() to access ->i_crypt_info 2019-04-16 18:57:09 -04:00
Makefile fscrypt: new helper function - fscrypt_file_open() 2017-10-18 19:52:37 -04:00
policy.c fscrypt: use READ_ONCE() to access ->i_crypt_info 2019-04-16 18:57:09 -04:00