linux/fs/f2fs
Eric Biggers 218cf245fc f2fs: prevent creating duplicate encrypted filenames
commit bfc2b7e851 upstream.

As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to
create a duplicate filename in an encrypted directory by creating a file
concurrently with adding the directory's encryption key.

Fix this bug on f2fs by rejecting no-key dentries in f2fs_add_link().

Note that the weird check for the current task in f2fs_do_add_link()
seems to make this bug difficult to reproduce on f2fs.

Fixes: 9ea97163c6 ("f2fs crypto: add filename encryption for f2fs_add_link")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201118075609.120337-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:44:58 +01:00
..
acl.c
acl.h
checkpoint.c f2fs: fix to check segment boundary during SIT page readahead 2020-11-05 11:08:39 +01:00
data.c f2fs: Return EOF on unaligned end of file DIO read 2020-09-23 12:10:59 +02:00
debug.c f2fs: don't access node/meta inode mapping after iput 2019-07-10 09:53:45 +02:00
dir.c f2fs: fix uninit-value in f2fs_lookup 2020-11-05 11:08:39 +01:00
extent_cache.c
f2fs.h f2fs: prevent creating duplicate encrypted filenames 2021-01-06 14:44:58 +01:00
file.c f2fs: fix potential overflow 2020-01-17 19:47:13 +01:00
gc.c f2fs: fix to allow node segment for GC by ioctl path 2019-12-13 08:51:51 +01:00
gc.h
hash.c
inline.c f2fs: fix error path in do_recover_data() 2020-09-03 11:24:20 +02:00
inode.c f2fs: fix to update time in lazytime mode 2020-01-04 19:12:37 +01:00
Kconfig
Makefile
namei.c fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext 2020-11-05 11:08:35 +01:00
node.c f2fs: fix indefinite loop scanning for free nid 2020-09-23 12:10:58 +02:00
node.h
recovery.c f2fs: fix error path in do_recover_data() 2020-09-03 11:24:20 +02:00
segment.c f2fs: fix to account preflush command for noflush_merge mode 2019-12-13 08:51:48 +01:00
segment.h f2fs: use generic EFSBADCRC/EFSCORRUPTED 2019-10-01 08:26:13 +02:00
shrinker.c
super.c f2fs: fix use-after-free issue 2020-09-03 11:24:21 +02:00
sysfs.c f2fs: wait for sysfs kobject removal before freeing f2fs_sb_info 2020-10-30 10:38:20 +01:00
trace.c f2fs: do not use mutex lock in atomic context 2019-04-05 22:32:59 +02:00
trace.h
xattr.c f2fs: fix to avoid memory leakage in f2fs_listxattr 2020-04-29 16:31:17 +02:00
xattr.h f2fs: fix to avoid accessing xattr across the boundary 2019-06-19 08:18:02 +02:00