================================================================== BUG: KASAN: use-after-free in check_igot_inode fs/ext4/inode.c:-1 [inline] BUG: KASAN: use-after-free in __ext4_iget+0x2b8/0x3d80 fs/ext4/inode.c:4856 Read of size 8 at addr ffff888072349840 by task syz.3.2585/14122 CPU: 0 PID: 14122 Comm: syz.3.2585 Not tainted 6.1.147-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x200 mm/kasan/report.c:418 kasan_report+0x10b/0x140 mm/kasan/report.c:522 check_igot_inode fs/ext4/inode.c:-1 [inline] __ext4_iget+0x2b8/0x3d80 fs/ext4/inode.c:4856 ext4_quota_enable fs/ext4/super.c:7022 [inline] ext4_enable_quotas+0x344/0xb50 fs/ext4/super.c:7058 __ext4_fill_super fs/ext4/super.c:5521 [inline] ext4_fill_super+0x7a03/0x8110 fs/ext4/super.c:5666 get_tree_bdev+0x3f1/0x610 fs/super.c:1366 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x24a/0xa40 fs/namespace.c:3063 do_mount fs/namespace.c:3406 [inline] __do_sys_mount fs/namespace.c:3614 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3591 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0470f9014a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0471d2fe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f0471d2fef0 RCX: 00007f0470f9014a RDX: 0000200000000180 RSI: 0000200000000000 RDI: 00007f0471d2feb0 RBP: 0000200000000180 R08: 00007f0471d2fef0 R09: 0000000002008002 R10: 0000000002008002 R11: 0000000000000246 R12: 0000200000000000 R13: 00007f0471d2feb0 R14: 000000000000056f R15: 0000200000000400 Allocated by task 13485: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc_lru+0x11a/0x2e0 mm/slub.c:3429 alloc_inode_sb include/linux/fs.h:3245 [inline] f2fs_alloc_inode+0x151/0x520 fs/f2fs/super.c:1419 alloc_inode fs/inode.c:261 [inline] iget_locked+0x1a9/0x830 fs/inode.c:1373 f2fs_iget+0x52/0x4a00 fs/f2fs/inode.c:483 f2fs_fill_super+0x49ad/0x6b20 fs/f2fs/super.c:4417 mount_bdev+0x287/0x3c0 fs/super.c:1443 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x24a/0xa40 fs/namespace.c:3063 do_mount fs/namespace.c:3406 [inline] __do_sys_mount fs/namespace.c:3614 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3591 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 call_rcu+0x154/0x980 kernel/rcu/tree.c:2849 destroy_inode fs/inode.c:316 [inline] evict+0x7da/0x870 fs/inode.c:720 dispose_list fs/inode.c:738 [inline] evict_inodes+0x604/0x690 fs/inode.c:792 generic_shutdown_super+0x93/0x340 fs/super.c:480 kill_block_super+0x7c/0xe0 fs/super.c:1470 kill_f2fs_super+0x2ed/0x3a0 fs/f2fs/super.c:4688 deactivate_locked_super+0x93/0xf0 fs/super.c:332 cleanup_mnt+0x463/0x4f0 fs/namespace.c:1182 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 call_rcu+0x154/0x980 kernel/rcu/tree.c:2849 destroy_inode fs/inode.c:316 [inline] evict+0x7da/0x870 fs/inode.c:720 dispose_list fs/inode.c:738 [inline] evict_inodes+0x604/0x690 fs/inode.c:792 generic_shutdown_super+0x93/0x340 fs/super.c:480 kill_block_super+0x7c/0xe0 fs/super.c:1470 kill_f2fs_super+0x2ed/0x3a0 fs/f2fs/super.c:4688 deactivate_locked_super+0x93/0xf0 fs/super.c:332 cleanup_mnt+0x463/0x4f0 fs/namespace.c:1182 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff8880723491c0 which belongs to the cache f2fs_inode_cache of size 2144 The buggy address is located 1664 bytes inside of 2144-byte region [ffff8880723491c0, ffff888072349a20) The buggy address belongs to the physical page: page:ffffea0001c8d200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807234be20 pfn:0x72348 head:ffffea0001c8d200 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff88807e57af01 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff88814173a500 raw: ffff88807234be20 00000000800e000b 00000001ffffffff ffff88807e57af01 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 7503, tgid 7502 (syz.4.1121), ts 272380038576, free_ts 213594207664 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 alloc_slab_page+0x5d/0x160 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x87/0x2c0 mm/slub.c:1992 ___slab_alloc+0xbc6/0x1220 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc_lru+0x1ae/0x2e0 mm/slub.c:3429 alloc_inode_sb include/linux/fs.h:3245 [inline] f2fs_alloc_inode+0x151/0x520 fs/f2fs/super.c:1419 alloc_inode fs/inode.c:261 [inline] iget_locked+0x1a9/0x830 fs/inode.c:1373 f2fs_iget+0x52/0x4a00 fs/f2fs/inode.c:483 f2fs_fill_super+0x4849/0x6b20 fs/f2fs/super.c:4409 mount_bdev+0x287/0x3c0 fs/super.c:1443 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x24a/0xa40 fs/namespace.c:3063 do_mount fs/namespace.c:3406 [inline] __do_sys_mount fs/namespace.c:3614 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3591 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479 free_slab mm/slub.c:2031 [inline] discard_slab mm/slub.c:2037 [inline] __unfreeze_partials+0x1a5/0x200 mm/slub.c:2586 put_cpu_partial+0x17c/0x250 mm/slub.c:2662 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3422 dup_mm kernel/fork.c:1532 [inline] copy_mm+0x164/0x15c0 kernel/fork.c:1590 copy_process+0x1953/0x4020 kernel/fork.c:2351 kernel_clone+0x225/0x8b0 kernel/fork.c:2757 __do_sys_clone kernel/fork.c:2898 [inline] __se_sys_clone kernel/fork.c:2882 [inline] __x64_sys_clone+0x17c/0x1d0 kernel/fork.c:2882 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888072349700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888072349780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888072349800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888072349880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888072349900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================