================================================================== BUG: KASAN: use-after-free in iput+0x6b/0x70 fs/inode.c:1670 Read of size 8 at addr ffff888088471428 by task syz-executor.4/6264 CPU: 0 PID: 6264 Comm: syz-executor.4 Not tainted 5.12.0-rc7-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:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 iput+0x6b/0x70 fs/inode.c:1670 init_statfs fs/gfs2/ops_fstype.c:703 [inline] init_journal fs/gfs2/ops_fstype.c:807 [inline] init_inodes+0x20e6/0x2610 fs/gfs2/ops_fstype.c:876 gfs2_fill_super+0x1b52/0x2680 fs/gfs2/ops_fstype.c:1208 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1277 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2903 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3233 do_mount fs/namespace.c:3246 [inline] __do_sys_mount fs/namespace.c:3454 [inline] __se_sys_mount fs/namespace.c:3431 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3431 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x46797a 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:00007fa23ac13fa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 000000000046797a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fa23ac14000 RBP: 00007fa23ac14040 R08: 00007fa23ac14040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000 R13: 0000000020000100 R14: 00007fa23ac14000 R15: 0000000020047a20 Allocated by task 6264: 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:2907 [inline] slab_alloc mm/slub.c:2915 [inline] kmem_cache_alloc+0x155/0x370 mm/slub.c:2920 gfs2_alloc_inode+0x38/0x1a0 fs/gfs2/super.c:1499 alloc_inode+0x61/0x230 fs/inode.c:234 iget5_locked fs/inode.c:1148 [inline] iget5_locked+0x1e7/0x2e0 fs/inode.c:1141 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:1662 gfs2_lookupi+0x475/0x640 fs/gfs2/inode.c:333 gfs2_lookup_simple+0x99/0xe0 fs/gfs2/inode.c:273 init_statfs fs/gfs2/ops_fstype.c:660 [inline] init_journal fs/gfs2/ops_fstype.c:807 [inline] init_inodes+0x16a0/0x2610 fs/gfs2/ops_fstype.c:876 gfs2_fill_super+0x1b52/0x2680 fs/gfs2/ops_fstype.c:1208 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1277 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2903 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3233 do_mount fs/namespace.c:3246 [inline] __do_sys_mount fs/namespace.c:3454 [inline] __se_sys_mount fs/namespace.c:3431 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3431 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 6264: 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:1562 [inline] slab_free_freelist_hook+0x92/0x210 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kmem_cache_free+0x8a/0x740 mm/slub.c:3177 i_callback+0x3f/0x70 fs/inode.c:223 rcu_do_batch kernel/rcu/tree.c:2559 [inline] rcu_core+0x74a/0x12f0 kernel/rcu/tree.c:2794 __do_softirq+0x29b/0x9f6 kernel/softirq.c:345 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:3039 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3114 destroy_inode+0x129/0x1b0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670 init_statfs fs/gfs2/ops_fstype.c:691 [inline] init_journal fs/gfs2/ops_fstype.c:807 [inline] init_inodes+0x19aa/0x2610 fs/gfs2/ops_fstype.c:876 gfs2_fill_super+0x1b52/0x2680 fs/gfs2/ops_fstype.c:1208 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1277 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2903 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3233 do_mount fs/namespace.c:3246 [inline] __do_sys_mount fs/namespace.c:3454 [inline] __se_sys_mount fs/namespace.c:3431 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3431 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 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:3039 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3114 destroy_inode+0x129/0x1b0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670 free_local_statfs_inodes+0xef/0x370 fs/gfs2/super.c:1525 uninit_statfs fs/gfs2/ops_fstype.c:715 [inline] init_journal fs/gfs2/ops_fstype.c:847 [inline] init_inodes+0x1deb/0x2610 fs/gfs2/ops_fstype.c:916 gfs2_fill_super+0x1b52/0x2680 fs/gfs2/ops_fstype.c:1208 get_tree_bdev+0x440/0x760 fs/super.c:1292 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1277 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:2903 [inline] path_mount+0x132a/0x1f90 fs/namespace.c:3233 do_mount fs/namespace.c:3246 [inline] __do_sys_mount fs/namespace.c:3454 [inline] __se_sys_mount fs/namespace.c:3431 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3431 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888088471350 which belongs to the cache gfs2_inode of size 1520 The buggy address is located 216 bytes inside of 1520-byte region [ffff888088471350, ffff888088471940) The buggy address belongs to the page: page:ffffea0002211c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888088474060 pfn:0x88470 head:ffffea0002211c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 ffffea00020ce600 0000000400000004 ffff8880175843c0 raw: ffff888088474060 0000000080130011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888088471300: fc fc fc fc fc fc fc fc fc fc fa fb fb fb fb fb ffff888088471380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888088471400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888088471480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888088471500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================