loop0: detected capacity change from 0 to 4096 ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x81/0xa0 lib/list_debug.c:23 Read of size 8 at addr ffff88802858b518 by task syz-executor.0/2903 CPU: 0 PID: 2903 Comm: syz-executor.0 Not tainted 5.14.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x41/0x5e lib/dump_stack.c:105 print_address_description.constprop.0.cold+0x6c/0x30a mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 __list_add_valid+0x81/0xa0 lib/list_debug.c:23 __list_add include/linux/list.h:67 [inline] list_add include/linux/list.h:86 [inline] chrdev_open+0x40c/0x650 fs/char_dev.c:396 do_dentry_open+0x425/0xf80 fs/open.c:826 do_open fs/namei.c:3374 [inline] path_openat+0x1593/0x22b0 fs/namei.c:3507 do_filp_open+0x199/0x3d0 fs/namei.c:3534 do_sys_openat2+0x11e/0x360 fs/open.c:1204 do_sys_open fs/open.c:1220 [inline] __do_sys_openat fs/open.c:1236 [inline] __se_sys_openat fs/open.c:1231 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1231 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3c/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7efd3e5b0ea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007efd3e1320c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007efd3e6def80 RCX: 00007efd3e5b0ea9 RDX: 0000000000000000 RSI: 0000000020002140 RDI: ffffffffffffff9c RBP: 00007efd3e5fd4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007efd3e6def80 R15: 00007ffc56648a98 Allocated by task 2900: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x83/0xb0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:2959 [inline] slab_alloc mm/slub.c:2967 [inline] kmem_cache_alloc+0x19c/0x3a0 mm/slub.c:2972 ntfs_alloc_inode+0x13/0x60 fs/ntfs3/super.c:406 alloc_inode+0x59/0x1e0 fs/inode.c:233 new_inode_pseudo fs/inode.c:934 [inline] new_inode+0x1a/0x2d0 fs/inode.c:963 ntfs_new_inode+0x32/0xd0 fs/ntfs3/fsntfs.c:1665 ntfs_create_inode+0x2d3/0x4b80 fs/ntfs3/inode.c:1278 ntfs_mknod+0x49/0x80 fs/ntfs3/namei.c:124 vfs_mknod+0x119/0x3c0 fs/namei.c:3704 do_mknodat.part.0+0x1b9/0x3e0 fs/namei.c:3764 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3c/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 0: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xff/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1628 [inline] slab_free_freelist_hook+0xb9/0x1f0 mm/slub.c:1653 slab_free mm/slub.c:3213 [inline] kmem_cache_free+0x8a/0x450 mm/slub.c:3229 rcu_do_batch kernel/rcu/tree.c:2550 [inline] rcu_core+0x553/0x10c0 kernel/rcu/tree.c:2785 __do_softirq+0x1f1/0x641 kernel/softirq.c:558 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe9/0x110 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3029 [inline] call_rcu+0x98/0x6a0 kernel/rcu/tree.c:3109 destroy_inode+0xb7/0x190 fs/inode.c:283 __dentry_kill+0x31a/0x5f0 fs/dcache.c:582 shrink_dentry_list+0x189/0x500 fs/dcache.c:1176 shrink_dcache_parent+0x158/0x200 fs/dcache.c:1627 do_one_tree fs/dcache.c:1657 [inline] shrink_dcache_for_umount+0x54/0x2c0 fs/dcache.c:1674 generic_shutdown_super+0x5c/0x330 fs/super.c:447 kill_block_super+0x93/0xd0 fs/super.c:1395 deactivate_locked_super+0x80/0x130 fs/super.c:335 cleanup_mnt+0x2b8/0x3e0 fs/namespace.c:1136 task_work_run+0xc5/0x150 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x16e/0x170 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x13/0x30 kernel/entry/common.c:302 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88802858af08 which belongs to the cache ntfs_inode_cache of size 1592 The buggy address is located 1552 bytes inside of 1592-byte region [ffff88802858af08, ffff88802858b540) The buggy address belongs to the page: page:ffffea0000a16200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28588 head:ffffea0000a16200 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff8880102f9501 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff8881427c9dc0 raw: 0000000000000000 0000000080130013 00000001ffffffff ffff8880102f9501 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 2900, ts 49690240092, free_ts 0 prep_new_page mm/page_alloc.c:2436 [inline] get_page_from_freelist+0x1357/0x2ea0 mm/page_alloc.c:4168 __alloc_pages+0x1b2/0x480 mm/page_alloc.c:5390 alloc_slab_page mm/slub.c:1691 [inline] allocate_slab+0x315/0x480 mm/slub.c:1831 new_slab mm/slub.c:1894 [inline] new_slab_objects mm/slub.c:2640 [inline] ___slab_alloc+0x44c/0x710 mm/slub.c:2803 __slab_alloc.constprop.0+0x44/0x80 mm/slub.c:2843 slab_alloc_node mm/slub.c:2925 [inline] slab_alloc mm/slub.c:2967 [inline] kmem_cache_alloc+0x350/0x3a0 mm/slub.c:2972 ntfs_alloc_inode+0x13/0x60 fs/ntfs3/super.c:406 alloc_inode+0x59/0x1e0 fs/inode.c:233 iget5_locked fs/inode.c:1154 [inline] iget5_locked+0x3f/0xa0 fs/inode.c:1147 ntfs_iget5+0xc3/0x3130 fs/ntfs3/inode.c:499 ntfs_fill_super+0x1347/0x3670 fs/ntfs3/super.c:938 get_tree_bdev+0x392/0x680 fs/super.c:1293 vfs_get_tree+0x88/0x1c0 fs/super.c:1498 do_new_mount fs/namespace.c:2923 [inline] path_mount+0x41e/0x1a00 fs/namespace.c:3253 do_mount fs/namespace.c:3266 [inline] __do_sys_mount fs/namespace.c:3474 [inline] __se_sys_mount fs/namespace.c:3451 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3451 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3c/0x90 arch/x86/entry/common.c:80 page_owner free stack trace missing Memory state around the buggy address: ffff88802858b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802858b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802858b500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88802858b580: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88802858b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================