================================================================== BUG: KASAN: out-of-bounds in folio_batch_count include/linux/pagevec.h:108 [inline] BUG: KASAN: out-of-bounds in truncate_inode_pages_range+0x55c/0x17b0 mm/truncate.c:371 Read of size 1 at addr ffffc9000548f8a0 by task syz-executor.0/15882 CPU: 0 PID: 15882 Comm: syz-executor.0 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x220 mm/kasan/report.c:433 kasan_report+0xfb/0x130 mm/kasan/report.c:495 folio_batch_count include/linux/pagevec.h:108 [inline] truncate_inode_pages_range+0x55c/0x17b0 mm/truncate.c:371 ntfs_evict_inode+0x18/0xb0 fs/ntfs3/inode.c:1741 evict+0x2a4/0x620 fs/inode.c:664 ntfs_fill_super+0x3c6c/0x4420 fs/ntfs3/super.c:1190 get_tree_bdev+0x400/0x620 fs/super.c:1323 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x289/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f983dc8cada Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f983ed66f88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000bc0 RCX: 00007f983dc8cada RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f983ed66fe0 RBP: 00007f983ed67020 R08: 00007f983ed67020 R09: 0000000020000000 R10: 0000000000000002 R11: 0000000000000202 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f983ed66fe0 R15: 0000000020003580 The buggy address belongs to stack of task syz-executor.0/15882 and is located at offset 32 in frame: truncate_inode_pages_range+0x0/0x17b0 This frame has 2 objects: [32, 160) 'fbatch' [192, 312) 'indices' The buggy address belongs to the virtual mapping at [ffffc90005488000, ffffc90005491000) created by: dup_task_struct+0x8b/0x490 kernel/fork.c:977 The buggy address belongs to the physical page: page:ffffea0001dbc280 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76f0a memcg:ffff88801cc32182 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88801cc32182 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 15881, tgid 15881 (syz-executor.0), ts 387712239035, free_ts 387154147136 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 vm_area_alloc_pages mm/vmalloc.c:2958 [inline] __vmalloc_area_node mm/vmalloc.c:3026 [inline] __vmalloc_node_range+0x8f4/0x1290 mm/vmalloc.c:3196 alloc_thread_stack_node+0x307/0x500 kernel/fork.c:312 dup_task_struct+0x8b/0x490 kernel/fork.c:977 copy_process+0x637/0x3fc0 kernel/fork.c:2085 kernel_clone+0x227/0x640 kernel/fork.c:2672 __do_sys_clone kernel/fork.c:2806 [inline] __se_sys_clone kernel/fork.c:2790 [inline] __x64_sys_clone+0x276/0x2e0 kernel/fork.c:2790 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x812/0x900 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page_list+0xb4/0x7b0 mm/page_alloc.c:3522 release_pages+0x22c3/0x2540 mm/swap.c:1012 tlb_batch_pages_flush mm/mmu_gather.c:58 [inline] tlb_flush_mmu_free mm/mmu_gather.c:255 [inline] tlb_flush_mmu+0x850/0xa70 mm/mmu_gather.c:262 tlb_finish_mmu+0xcb/0x200 mm/mmu_gather.c:353 exit_mmap+0x1dc/0x530 mm/mmap.c:3118 __mmput+0x111/0x3a0 kernel/fork.c:1187 exit_mm+0x211/0x2f0 kernel/exit.c:510 do_exit+0x635/0x2280 kernel/exit.c:800 do_group_exit+0x1fd/0x2b0 kernel/exit.c:943 get_signal+0x1743/0x1810 kernel/signal.c:2858 arch_do_signal_or_restart+0x8d/0x750 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:166 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc9000548f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000548f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000548f880: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc9000548f900: 00 00 00 00 f2 f2 f2 f2 00 00 00 00 00 00 00 00 ffffc9000548f980: 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 ==================================================================