android_kernel_motorola_sm6375/fs/f2fs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers 2173a7ed63 f2fs: avoid utf8_strncasecmp() with unstable name
[ Upstream commit fc3bb095ab02b9e7d89a069ade2cead15c64c504 ]

If the dentry name passed to ->d_compare() fits in dentry::d_iname, then
it may be concurrently modified by a rename.  This can cause undefined
behavior (possibly out-of-bounds memory accesses or crashes) in
utf8_strncasecmp(), since fs/unicode/ isn't written to handle strings
that may be concurrently modified.

Fix this by first copying the filename to a stack buffer if needed.
This way we get a stable snapshot of the filename.

Fixes: 2c2eb7a300 ("f2fs: Support case-insensitive file name lookups")
Cc: <[email protected]> # v5.4+
Cc: Al Viro <[email protected]>
Cc: Daniel Rosenberg <[email protected]>
Cc: Gabriel Krisman Bertazi <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-06-24 17:50:50 +02:00
..
acl.c
acl.h
checkpoint.c f2fs: don't return vmalloc() memory from f2fs_kmalloc() 2020-06-24 17:50:41 +02:00
data.c f2fs: fix to add swap extent correctly 2020-03-05 16:43:48 +01:00
debug.c fs: f2fs: Remove unnecessary checks of SM_I(sbi) in update_general_status() 2019-08-23 07:57:12 -07:00
dir.c f2fs: avoid utf8_strncasecmp() with unstable name 2020-06-24 17:50:50 +02:00
extent_cache.c f2fs: introduce f2fs_<level> macros to wrap f2fs_printk() 2019-07-02 15:40:40 -07:00
f2fs.h f2fs: split f2fs_d_compare() from f2fs_match_name() 2020-06-24 17:50:49 +02:00
file.c f2fs: handle readonly filesystem in f2fs_ioc_shutdown() 2020-06-24 17:50:19 +02:00
gc.c f2fs: Fix mount failure due to SPO after a successful online resize FS 2020-04-23 10:36:33 +02:00
gc.h
hash.c f2fs: Support case-insensitive file name lookups 2019-08-23 07:57:13 -07:00
inline.c f2fs: fix to avoid accessing uninitialized field of inode page in is_alive() 2019-09-16 08:38:26 -07:00
inode.c f2fs: fix to update time in lazytime mode 2020-01-04 19:16:31 +01:00
Kconfig f2fs: Add a small clarification to CONFIG_FS_F2FS_FS_SECURITY 2019-09-16 08:38:48 -07:00
Makefile f2fs: add fs-verity support 2019-08-12 19:33:51 -07:00
namei.c f2fs: set I_LINKABLE early to avoid wrong access by vfs 2020-02-24 08:36:50 +01:00
node.c f2fs: don't return vmalloc() memory from f2fs_kmalloc() 2020-06-24 17:50:41 +02:00
node.h
recovery.c f2fs: use generic EFSBADCRC/EFSCORRUPTED 2019-07-02 15:40:41 -07:00
segment.c f2fs: Fix deadlock in f2fs_gc() context during atomic files handling 2020-01-04 19:18:18 +01:00
segment.h f2fs: enhance f2fs_is_checkpoint_ready()'s readability 2019-09-06 16:18:26 -07:00
shrinker.c
super.c f2fs: don't return vmalloc() memory from f2fs_kmalloc() 2020-06-24 17:50:41 +02:00
sysfs.c f2fs: fix memleak of kobject 2020-02-24 08:36:53 +01:00
trace.c
trace.h
verity.c f2fs: add fs-verity support 2019-08-12 19:33:51 -07:00
xattr.c f2fs: fix to avoid memory leakage in f2fs_listxattr 2020-04-29 16:32:55 +02:00
xattr.h f2fs: add fs-verity support 2019-08-12 19:33:51 -07:00