loop0: detected capacity change from 0 to 4096 ntfs3(loop0): Failed to load $UpCase (-22). ================================================================== BUG: KASAN: stack-out-of-bounds in find_lock_entries+0x11d/0xbc0 mm/filemap.c:2125 Read of size 8 at addr ffffc9000d5379df by task syz.0.0/5318 CPU: 0 UID: 0 PID: 5318 Comm: syz.0.0 Not tainted 6.14.0-syzkaller-02665-g1e26c5e28ca5 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 find_lock_entries+0x11d/0xbc0 mm/filemap.c:2125 shmem_undo_range+0x2d6/0x1820 mm/shmem.c:1094 shmem_truncate_range mm/shmem.c:1224 [inline] shmem_evict_inode+0x29d/0xa80 mm/shmem.c:1352 evict+0x4f9/0x9b0 fs/inode.c:810 __dentry_kill+0x20d/0x630 fs/dcache.c:643 dput+0x19f/0x2b0 fs/dcache.c:885 __fput+0x60b/0x9f0 fs/file_table.c:473 task_work_run+0x251/0x310 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x13f/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f468058bdca Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 43 91 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 a3 91 02 00 8b 44 24 RSP: 002b:00007f4681358e50 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: ffffffffffffffff RCX: 00007f468058bdca RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000016 R13: 00007f4681358eb0 R14: 000000000001f768 R15: 0000200000000400 The buggy address belongs to stack of task syz.0.0/5318 and is located at offset 671 in frame: shmem_undo_range+0x0/0x1820 include/linux/fs.h:-1 This frame has 3 objects: [32, 288) 'fbatch' [352, 600) 'indices' [672, 680) 'index' The buggy address belongs to the virtual mapping at [ffffc9000d530000, ffffc9000d539000) created by: copy_process+0x5dc/0x3d10 kernel/fork.c:2225 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880435dd2e8 pfn:0x435dd memcg:ffff8880435f1d82 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff8880435dd2e8 0000000000000000 00000001ffffffff ffff8880435f1d82 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 5315, tgid 5315 (syz.0.0), ts 58173017758, free_ts 56404968800 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x3695/0x37e0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x2c5/0x7b0 mm/page_alloc.c:4740 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0x121/0x190 mm/mempolicy.c:2392 vm_area_alloc_pages mm/vmalloc.c:3591 [inline] __vmalloc_area_node mm/vmalloc.c:3669 [inline] __vmalloc_node_range_noprof+0x9cb/0x1390 mm/vmalloc.c:3846 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1127 copy_process+0x5dc/0x3d10 kernel/fork.c:2225 kernel_clone+0x242/0x930 kernel/fork.c:2810 __do_sys_clone3 kernel/fork.c:3114 [inline] __se_sys_clone3+0x348/0x380 kernel/fork.c:3093 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5299 tgid 5299 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe16/0x10f0 mm/page_alloc.c:2660 __slab_free+0x2c6/0x390 mm/slub.c:4544 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4138 [inline] slab_alloc_node mm/slub.c:4187 [inline] kmem_cache_alloc_node_noprof+0x1f2/0x3b0 mm/slub.c:4239 __alloc_skb+0x1c2/0x480 net/core/skbuff.c:596 netlink_sendmsg+0x65c/0xce0 net/netlink/af_netlink.c:1857 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 __sys_sendto+0x365/0x4c0 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2190 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc9000d537880: f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000d537900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000d537980: 00 00 00 f2 f2 f2 f2 f2 f2 f2 f2 f2 00 f3 f3 f3 ^ ffffc9000d537a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000d537a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 ==================================================================