R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000 R13: 0000000020000100 R14: 00007fabf65f9000 R15: 0000000020047a20 gfs2: fsid=syz:syz.0: can't lock local "sc" file: -5 ================================================================== BUG: KASAN: use-after-free in iput+0x6b/0x70 fs/inode.c:1669 Read of size 8 at addr ffff88807d8e67d8 by task syz-executor.1/24346 CPU: 1 PID: 24346 Comm: syz-executor.1 Not tainted 5.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 iput+0x6b/0x70 fs/inode.c:1669 init_statfs fs/gfs2/ops_fstype.c:701 [inline] init_journal fs/gfs2/ops_fstype.c:805 [inline] init_inodes+0x20e6/0x2610 fs/gfs2/ops_fstype.c:874 gfs2_fill_super+0x1b4a/0x2680 fs/gfs2/ops_fstype.c:1204 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1273 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x467b1a Code: 48 c7 c2 bc 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fabf65f8fa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 0000000000467b1a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fabf65f9000 RBP: 00007fabf65f9040 R08: 00007fabf65f9040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000 R13: 0000000020000100 R14: 00007fabf65f9000 R15: 0000000020047a20 Allocated by task 24346: 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:427 [inline] __kasan_slab_alloc+0x75/0x90 mm/kasan/common.c:460 kasan_slab_alloc include/linux/kasan.h:223 [inline] slab_post_alloc_hook mm/slab.h:516 [inline] slab_alloc_node mm/slub.c:2908 [inline] slab_alloc mm/slub.c:2916 [inline] kmem_cache_alloc+0x153/0x370 mm/slub.c:2921 gfs2_alloc_inode+0x38/0x1a0 fs/gfs2/super.c:1499 alloc_inode+0x61/0x230 fs/inode.c:233 iget5_locked fs/inode.c:1147 [inline] iget5_locked+0x1e7/0x2e0 fs/inode.c:1140 gfs2_iget fs/gfs2/inode.c:64 [inline] gfs2_inode_lookup+0x104/0xb10 fs/gfs2/inode.c:140 gfs2_dir_search+0x20f/0x2c0 fs/gfs2/dir.c:1665 gfs2_lookupi+0x475/0x640 fs/gfs2/inode.c:332 gfs2_lookup_simple+0x99/0xe0 fs/gfs2/inode.c:273 init_statfs fs/gfs2/ops_fstype.c:658 [inline] init_journal fs/gfs2/ops_fstype.c:805 [inline] init_inodes+0x16a0/0x2610 fs/gfs2/ops_fstype.c:874 gfs2_fill_super+0x1b4a/0x2680 fs/gfs2/ops_fstype.c:1204 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1273 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 19: 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:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xf5/0x130 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1563 [inline] slab_free_freelist_hook+0x92/0x210 mm/slub.c:1601 slab_free mm/slub.c:3162 [inline] kmem_cache_free+0x8a/0x730 mm/slub.c:3178 i_callback+0x3f/0x70 fs/inode.c:222 rcu_do_batch kernel/rcu/tree.c:2558 [inline] rcu_core+0x7ab/0x13b0 kernel/rcu/tree.c:2793 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 destroy_inode+0x129/0x1b0 fs/inode.c:288 iput_final fs/inode.c:1653 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1679 iput+0x58/0x70 fs/inode.c:1669 init_statfs fs/gfs2/ops_fstype.c:689 [inline] init_journal fs/gfs2/ops_fstype.c:805 [inline] init_inodes+0x19aa/0x2610 fs/gfs2/ops_fstype.c:874 gfs2_fill_super+0x1b4a/0x2680 fs/gfs2/ops_fstype.c:1204 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1273 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 destroy_inode+0x129/0x1b0 fs/inode.c:288 iput_final fs/inode.c:1653 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1679 iput+0x58/0x70 fs/inode.c:1669 uninit_statfs fs/gfs2/ops_fstype.c:715 [inline] init_journal fs/gfs2/ops_fstype.c:845 [inline] init_inodes+0x1bb/0x2610 fs/gfs2/ops_fstype.c:914 gfs2_fill_super+0x1b4a/0x2680 fs/gfs2/ops_fstype.c:1204 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1273 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88807d8e6700 which belongs to the cache gfs2_inode of size 1520 The buggy address is located 216 bytes inside of 1520-byte region [ffff88807d8e6700, ffff88807d8e6cf0) The buggy address belongs to the page: page:ffffea0001f63800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d8e0 head:ffffea0001f63800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001ddb600 0000000200000002 ffff8881415e1dc0 raw: 0000000000000000 0000000080130013 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88807d8e6680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807d8e6700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807d8e6780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807d8e6800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807d8e6880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================