================================================================== BUG: KASAN: use-after-free in iput+0x6b/0x70 fs/inode.c:1669 Read of size 8 at addr ffff8880929db458 by task syz-executor.0/21285 CPU: 0 PID: 21285 Comm: syz-executor.0 Not tainted 5.11.0-rc3-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+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 iput+0x6b/0x70 fs/inode.c:1669 init_statfs fs/gfs2/ops_fstype.c:684 [inline] init_journal fs/gfs2/ops_fstype.c:788 [inline] init_inodes+0x2103/0x2650 fs/gfs2/ops_fstype.c:857 gfs2_fill_super+0x1ae8/0x2580 fs/gfs2/ops_fstype.c:1184 get_tree_bdev+0x440/0x760 fs/super.c:1291 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1260 vfs_get_tree+0x89/0x2f0 fs/super.c:1496 do_new_mount fs/namespace.c:2878 [inline] path_mount+0x13ad/0x20c0 fs/namespace.c:3208 do_mount fs/namespace.c:3221 [inline] __do_sys_mount fs/namespace.c:3429 [inline] __se_sys_mount fs/namespace.c:3406 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3406 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x460c6a Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 8a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f7522e87a78 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f7522e87b10 RCX: 0000000000460c6a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f7522e87ad0 RBP: 00007f7522e87ad0 R08: 00007f7522e87b10 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020047a20 Allocated by task 21285: 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:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kasan_slab_alloc include/linux/kasan.h:209 [inline] slab_post_alloc_hook mm/slab.h:512 [inline] slab_alloc_node mm/slub.c:2891 [inline] slab_alloc mm/slub.c:2899 [inline] kmem_cache_alloc+0x1c6/0x440 mm/slub.c:2904 gfs2_alloc_inode+0x38/0x1a0 fs/gfs2/super.c:1546 alloc_inode+0x61/0x230 fs/inode.c:233 iget5_locked fs/inode.c:1147 [inline] iget5_locked+0x1dd/0x2d0 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:1662 gfs2_lookupi+0x46e/0x630 fs/gfs2/inode.c:333 gfs2_lookup_simple+0x99/0xe0 fs/gfs2/inode.c:273 init_statfs fs/gfs2/ops_fstype.c:641 [inline] init_journal fs/gfs2/ops_fstype.c:788 [inline] init_inodes+0x169d/0x2650 fs/gfs2/ops_fstype.c:857 gfs2_fill_super+0x1ae8/0x2580 fs/gfs2/ops_fstype.c:1184 get_tree_bdev+0x440/0x760 fs/super.c:1291 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1260 vfs_get_tree+0x89/0x2f0 fs/super.c:1496 do_new_mount fs/namespace.c:2878 [inline] path_mount+0x13ad/0x20c0 fs/namespace.c:3208 do_mount fs/namespace.c:3221 [inline] __do_sys_mount fs/namespace.c:3429 [inline] __se_sys_mount fs/namespace.c:3406 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3406 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 21280: 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:356 ____kasan_slab_free+0xe1/0x110 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:192 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1580 slab_free mm/slub.c:3142 [inline] kmem_cache_free+0x82/0x350 mm/slub.c:3158 i_callback+0x3f/0x70 fs/inode.c:222 rcu_do_batch kernel/rcu/tree.c:2489 [inline] rcu_core+0x5eb/0xf00 kernel/rcu/tree.c:2723 __do_softirq+0x2bc/0xa29 kernel/softirq.c:343 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:344 __call_rcu kernel/rcu/tree.c:2965 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3038 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:672 [inline] init_journal fs/gfs2/ops_fstype.c:788 [inline] init_inodes+0x19a7/0x2650 fs/gfs2/ops_fstype.c:857 gfs2_fill_super+0x1ae8/0x2580 fs/gfs2/ops_fstype.c:1184 get_tree_bdev+0x440/0x760 fs/super.c:1291 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1260 vfs_get_tree+0x89/0x2f0 fs/super.c:1496 do_new_mount fs/namespace.c:2878 [inline] path_mount+0x13ad/0x20c0 fs/namespace.c:3208 do_mount fs/namespace.c:3221 [inline] __do_sys_mount fs/namespace.c:3429 [inline] __se_sys_mount fs/namespace.c:3406 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3406 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:344 __call_rcu kernel/rcu/tree.c:2965 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3038 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:672 [inline] init_journal fs/gfs2/ops_fstype.c:788 [inline] init_inodes+0x19a7/0x2650 fs/gfs2/ops_fstype.c:857 gfs2_fill_super+0x1ae8/0x2580 fs/gfs2/ops_fstype.c:1184 get_tree_bdev+0x440/0x760 fs/super.c:1291 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1260 vfs_get_tree+0x89/0x2f0 fs/super.c:1496 do_new_mount fs/namespace.c:2878 [inline] path_mount+0x13ad/0x20c0 fs/namespace.c:3208 do_mount fs/namespace.c:3221 [inline] __do_sys_mount fs/namespace.c:3429 [inline] __se_sys_mount fs/namespace.c:3406 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3406 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880929db380 which belongs to the cache gfs2_inode of size 1520 The buggy address is located 216 bytes inside of 1520-byte region [ffff8880929db380, ffff8880929db970) The buggy address belongs to the page: page:000000003726000d refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880929d8670 pfn:0x929d8 head:000000003726000d order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 ffffea0001e95400 0000000600000006 ffff88801709dc80 raw: ffff8880929d8670 0000000080130010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880929db300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880929db380: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880929db400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880929db480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880929db500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================