================================================================== BUG: KASAN: stack-out-of-bounds in truncate_inode_pages_range+0xc0/0xf74 mm/truncate.c:335 Write of size 128 at addr ffff8000208274c0 by task syz-executor186/23547 CPU: 1 PID: 23547 Comm: syz-executor186 Not tainted 6.4.0-syzkaller-g941d77c77339 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x174/0x514 mm/kasan/report.c:462 kasan_report+0xd4/0x130 mm/kasan/report.c:572 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:187 __asan_memset+0x34/0x64 mm/kasan/shadow.c:84 truncate_inode_pages_range+0xc0/0xf74 mm/truncate.c:335 truncate_inode_pages mm/truncate.c:449 [inline] truncate_inode_pages_final+0x90/0xc0 mm/truncate.c:484 ntfs_evict_inode+0x20/0x48 fs/ntfs3/inode.c:1791 evict+0x260/0x68c fs/inode.c:665 iput_final fs/inode.c:1789 [inline] iput+0x734/0x818 fs/inode.c:1815 ntfs_fill_super+0x327c/0x3990 fs/ntfs3/super.c:1267 get_tree_bdev+0x378/0x570 fs/super.c:1319 ntfs_fs_get_tree+0x28/0x38 fs/ntfs3/super.c:1455 vfs_get_tree+0x90/0x274 fs/super.c:1520 do_new_mount+0x25c/0x8c8 fs/namespace.c:3335 path_mount+0x590/0xe04 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3861 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 The buggy address belongs to stack of task syz-executor186/23547 and is located at offset 32 in frame: folio_flags include/linux/page-flags.h:311 [inline] folio_test_head include/linux/page-flags.h:769 [inline] folio_test_large include/linux/page-flags.h:790 [inline] folio_nr_pages include/linux/mm.h:1998 [inline] truncate_inode_pages_range+0x0/0xf74 mm/truncate.c:277 This frame has 3 objects: [32, 160) 'fbatch' [192, 312) 'indices' [352, 360) 'index' The buggy address belongs to the virtual mapping at [ffff800020820000, ffff800020829000) created by: copy_process+0x488/0x34b8 kernel/fork.c:2333 The buggy address belongs to the physical page: page:00000000e3eb523a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107d23 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff800020827400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff800020827480: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 >ffff800020827500: 00 00 00 f3 00 00 00 00 f2 f2 f2 f2 00 00 00 00 ^ ffff800020827580: 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 f2 ffff800020827600: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ntfs3: loop3: Mark volume as dirty due to NTFS errors ntfs3: loop3: Failed to initialize $Extend/$Reparse. ntfs3: loop3: ino=0, ntfs_iget5 ntfs3: loop3: MFT: r=0, expect seq=5 instead of 1! ntfs3: loop3: ino=1f, "file2" failed to open parent directory r=0 to update