loop1: detected capacity change from 0 to 512 EXT4-fs (loop1): feature flags set on rev 0 fs, running e2fsck is recommended ================================================================== BUG: KASAN: slab-use-after-free in check_igot_inode+0x187/0x1b0 fs/ext4/inode.c:4622 Read of size 8 at addr ffff888031094690 by task syz-executor.1/25663 CPU: 1 PID: 25663 Comm: syz-executor.1 Not tainted 6.5.0-rc2-syzkaller-00307-gd192f5382581 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 check_igot_inode+0x187/0x1b0 fs/ext4/inode.c:4622 __ext4_iget+0x14fc/0x43b0 fs/ext4/inode.c:4674 __ext4_fill_super fs/ext4/super.c:5467 [inline] ext4_fill_super+0x64c9/0xaf30 fs/ext4/super.c:5696 get_tree_bdev+0x43e/0x7d0 fs/super.c:1318 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f474dc7e22a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f474e967ee8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f474e967f80 RCX: 00007f474dc7e22a RDX: 0000000020000040 RSI: 0000000020000140 RDI: 00007f474e967f40 RBP: 0000000020000040 R08: 00007f474e967f80 R09: 000000000000c906 R10: 000000000000c906 R11: 0000000000000202 R12: 0000000020000140 R13: 00007f474e967f40 R14: 00000000000004c5 R15: 000000000000002c Allocated by task 23494: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slab.c:3237 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc_lru+0x1ff/0x680 mm/slab.c:3439 alloc_inode_sb include/linux/fs.h:2729 [inline] reiserfs_alloc_inode+0x26/0xb0 fs/reiserfs/super.c:642 alloc_inode+0x5d/0x220 fs/inode.c:260 new_inode_pseudo fs/inode.c:1018 [inline] new_inode+0x29/0x270 fs/inode.c:1046 reiserfs_mkdir+0x214/0x9a0 fs/reiserfs/namei.c:813 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] create_privroot fs/reiserfs/xattr.c:890 [inline] reiserfs_xattr_init+0x57f/0xbb0 fs/reiserfs/xattr.c:1006 reiserfs_fill_super+0x2139/0x3150 fs/reiserfs/super.c:2175 mount_bdev+0x30d/0x3d0 fs/super.c:1391 legacy_get_tree+0x109/0x220 fs/fs_context.c:611 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0x78/0x80 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2649 destroy_inode+0x129/0x1b0 fs/inode.c:315 iput_final fs/inode.c:1791 [inline] iput.part.0+0x55e/0x7a0 fs/inode.c:1817 iput+0x5c/0x80 fs/inode.c:1807 reiserfs_new_inode+0x4b5/0x2100 fs/reiserfs/inode.c:2154 reiserfs_mkdir+0x4c0/0x9a0 fs/reiserfs/namei.c:843 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] create_privroot fs/reiserfs/xattr.c:890 [inline] reiserfs_xattr_init+0x57f/0xbb0 fs/reiserfs/xattr.c:1006 reiserfs_fill_super+0x2139/0x3150 fs/reiserfs/super.c:2175 mount_bdev+0x30d/0x3d0 fs/super.c:1391 legacy_get_tree+0x109/0x220 fs/fs_context.c:611 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880310940c0 which belongs to the cache reiser_inode_cache of size 1568 The buggy address is located 1488 bytes inside of freed 1568-byte region [ffff8880310940c0, ffff8880310946e0) The buggy address belongs to the physical page: page:ffffea0000c42500 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888031094ffe pfn:0x31094 memcg:ffff888066d17c01 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x1() raw: 00fff00000000200 ffff888104319a00 ffff88801ba73e40 ffffea0000c42550 raw: ffff888031094ffe ffff8880310940c0 0000000100000001 ffff888066d17c01 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x2420d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE|__GFP_RECLAIMABLE), pid 23494, tgid 23493 (syz-executor.1), ts 576368380157, free_ts 503825699712 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221 __alloc_pages_slowpath.constprop.0+0x2dd/0x2360 mm/page_alloc.c:4011 __alloc_pages+0x411/0x4a0 mm/page_alloc.c:4490 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x294/0x3a0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3182 [inline] slab_alloc_node mm/slab.c:3230 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc_lru+0x56c/0x680 mm/slab.c:3439 alloc_inode_sb include/linux/fs.h:2729 [inline] reiserfs_alloc_inode+0x26/0xb0 fs/reiserfs/super.c:642 alloc_inode+0x5d/0x220 fs/inode.c:260 iget5_locked fs/inode.c:1285 [inline] iget5_locked+0x63/0xe0 fs/inode.c:1278 reiserfs_fill_super+0x10e7/0x3150 fs/reiserfs/super.c:2053 mount_bdev+0x30d/0x3d0 fs/super.c:1391 legacy_get_tree+0x109/0x220 fs/fs_context.c:611 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x508/0xb90 mm/page_alloc.c:2348 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2443 slab_destroy mm/slab.c:1608 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1628 cache_flusharray mm/slab.c:3341 [inline] ___cache_free+0x2b6/0x420 mm/slab.c:3404 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x4c/0x1b0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x18b/0x1d0 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slab.c:3237 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc+0x15e/0x400 mm/slab.c:3432 kmem_cache_zalloc include/linux/slab.h:693 [inline] jbd2_alloc_handle include/linux/jbd2.h:1602 [inline] new_handle fs/jbd2/transaction.c:476 [inline] jbd2__journal_start+0x190/0x690 fs/jbd2/transaction.c:503 __ext4_journal_start_sb+0x40f/0x5c0 fs/ext4/ext4_jbd2.c:111 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] __ext4_unlink+0x418/0xcd0 fs/ext4/namei.c:3260 ext4_unlink+0x40b/0x580 fs/ext4/namei.c:3319 vfs_unlink+0x2f1/0x900 fs/namei.c:4329 do_unlinkat+0x3da/0x6d0 fs/namei.c:4395 __do_sys_unlink fs/namei.c:4443 [inline] __se_sys_unlink fs/namei.c:4441 [inline] __x64_sys_unlink+0xc8/0x110 fs/namei.c:4441 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff888031094580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888031094600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888031094680: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888031094700: fc fc fc fc fc fc fc fc fc fc fc fc 00 00 00 00 ffff888031094780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================