linux-next/fs/f2fs
Dmitry Antipov 76f01376df f2fs: ensure that node info flags are always initialized
Syzbot has reported the following KMSAN splat:

BUG: KMSAN: uninit-value in f2fs_new_node_page+0x1494/0x1630
 f2fs_new_node_page+0x1494/0x1630
 f2fs_new_inode_page+0xb9/0x100
 f2fs_init_inode_metadata+0x176/0x1e90
 f2fs_add_inline_entry+0x723/0xc90
 f2fs_do_add_link+0x48f/0xa70
 f2fs_symlink+0x6af/0xfc0
 vfs_symlink+0x1f1/0x470
 do_symlinkat+0x471/0xbc0
 __x64_sys_symlink+0xcf/0x140
 x64_sys_call+0x2fcc/0x3d90
 do_syscall_64+0xd9/0x1b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable new_ni created at:
 f2fs_new_node_page+0x9d/0x1630
 f2fs_new_inode_page+0xb9/0x100

So adjust 'f2fs_get_node_info()' to ensure that 'flag'
field of 'struct node_info' is always initialized.

Reported-by: syzbot+5141f6db57a2f7614352@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5141f6db57a2f7614352
Fixes: e05df3b115 ("f2fs: add node operations")
Suggested-by: Chao Yu <chao@kernel.org>
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-12-16 16:12:54 +00:00
..
acl.c f2fs: Use struct_size() to improve f2fs_acl_clone() 2024-10-14 20:04:57 +00:00
acl.h fs: port ->set_acl() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
checkpoint.c f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason() 2024-11-01 01:24:41 +00:00
compress.c f2fs: Use a folio in f2fs_write_compressed_pages() 2024-12-16 16:12:04 +00:00
data.c f2fs: cache more dentry pages 2024-12-16 16:12:28 +00:00
debug.c f2fs: fix typos 2024-11-01 01:24:41 +00:00
dir.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
extent_cache.c f2fs: add a sysfs node to limit max read extent count per-inode 2024-11-23 15:48:13 +00:00
f2fs.h f2fs: Add F2FS_F_SB() 2024-12-16 16:12:10 +00:00
file.c f2fs-for-6.13-rc1 2024-11-26 12:50:58 -08:00
gc.c f2fs: The GC triggered by ioctl also needs to mark the segno as victim 2024-12-16 16:12:29 +00:00
gc.h f2fs: decrease spare area for pinned files for zoned devices 2024-11-01 01:19:00 +00:00
hash.c f2fs: don't use casefolded comparison for "." and ".." 2022-05-17 11:19:23 -07:00
inline.c f2fs: Remove calls to folio_file_mapping() 2024-12-16 16:12:26 +00:00
inode.c f2fs: introduce device aliasing file 2024-11-01 01:19:00 +00:00
iostat.c f2fs: add async reset zone command support 2023-06-12 13:04:09 -07:00
iostat.h f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx() 2023-02-07 10:39:28 -08:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile f2fs: separate out iostat feature 2021-08-23 10:25:51 -07:00
namei.c f2fs: get rid of online repaire on corrupted directory 2024-09-11 03:30:27 +00:00
node.c f2fs: ensure that node info flags are always initialized 2024-12-16 16:12:54 +00:00
node.h f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC 2024-02-27 09:41:12 -08:00
recovery.c f2fs: fix changing cursegs if recovery fails on zoned device 2024-11-21 16:13:53 +00:00
segment.c f2fs: fix to drop all discards after creating snapshot on lvm device 2024-11-23 15:48:15 +00:00
segment.h f2fs: clean up the unused variable additional_reserved_segments 2024-11-01 01:24:41 +00:00
shrinker.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
super.c f2fs: fix to drop all discards after creating snapshot on lvm device 2024-11-23 15:48:15 +00:00
sysfs.c f2fs: add a sysfs node to limit max read extent count per-inode 2024-11-23 15:48:13 +00:00
verity.c f2fs-6.12-rc1 2024-09-24 15:12:38 -07:00
xattr.c f2fs: reduce expensive checkpoint trigger frequency 2024-08-15 15:26:39 +00:00
xattr.h f2fs: move f2fs_xattr_handlers and f2fs_xattr_handler_map to .rodata 2023-10-09 16:24:18 +02:00