EXT4-fs (loop0): ext4_check_descriptors: Block bitmap for group 0 overlaps block group descriptors EXT4-fs (loop0): ext4_check_descriptors: Checksum for group 0 failed (14919!=20869) ================================================================== BUG: KASAN: use-after-free in check_igot_inode fs/ext4/inode.c:-1 [inline] BUG: KASAN: use-after-free in __ext4_iget+0x3a0/0x41f0 fs/ext4/inode.c:4766 Read of size 8 at addr ffff888128de9ee8 by task syz.0.380/1219 CPU: 0 PID: 1219 Comm: syz.0.380 Not tainted 5.10.236-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 check_igot_inode fs/ext4/inode.c:-1 [inline] __ext4_iget+0x3a0/0x41f0 fs/ext4/inode.c:4766 ext4_get_journal_inode+0x33/0x1d0 fs/ext4/super.c:5243 ext4_calculate_overhead+0xde2/0x1100 fs/ext4/super.c:3967 ext4_fill_super+0x7248/0x9150 fs/ext4/super.c:4933 mount_bdev+0x262/0x370 fs/super.c:1442 ext4_mount+0x34/0x40 fs/ext4/super.c:6645 legacy_get_tree+0xf1/0x190 fs/fs_context.c:593 vfs_get_tree+0x88/0x290 fs/super.c:1572 do_new_mount+0x2ba/0xb30 fs/namespace.c:2917 path_mount+0x56f/0xcb0 fs/namespace.c:3247 do_mount fs/namespace.c:3260 [inline] __do_sys_mount fs/namespace.c:3468 [inline] __se_sys_mount+0x2c4/0x3b0 fs/namespace.c:3445 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3445 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f9d2786f10a 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:00007f9d25ed5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f9d25ed5ef0 RCX: 00007f9d2786f10a RDX: 00002000000000c0 RSI: 0000200000000040 RDI: 00007f9d25ed5eb0 RBP: 00002000000000c0 R08: 00007f9d25ed5ef0 R09: 0000000000000011 R10: 0000000000000011 R11: 0000000000000246 R12: 0000200000000040 R13: 00007f9d25ed5eb0 R14: 00000000000005fb R15: 0000200000000100 Allocated by task 1047: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2779 [inline] f2fs_alloc_inode+0x26/0x420 fs/f2fs/super.c:1373 alloc_inode fs/inode.c:233 [inline] iget_locked+0x14f/0x870 fs/inode.c:1275 f2fs_iget+0x55/0x50a0 fs/f2fs/inode.c:498 f2fs_fill_super+0x6459/0x7d90 fs/f2fs/super.c:4309 mount_bdev+0x262/0x370 fs/super.c:1442 f2fs_mount+0x34/0x40 fs/f2fs/super.c:4548 legacy_get_tree+0xf1/0x190 fs/fs_context.c:593 vfs_get_tree+0x88/0x290 fs/super.c:1572 do_new_mount+0x2ba/0xb30 fs/namespace.c:2917 path_mount+0x56f/0xcb0 fs/namespace.c:3247 do_mount fs/namespace.c:3260 [inline] __do_sys_mount fs/namespace.c:3468 [inline] __se_sys_mount+0x2c4/0x3b0 fs/namespace.c:3445 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3445 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 19: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kmem_cache_free+0xa9/0x1e0 mm/slub.c:3219 f2fs_free_inode+0x24/0x30 fs/f2fs/super.c:1528 i_callback+0x4b/0x70 fs/inode.c:222 rcu_do_batch+0x597/0xc40 kernel/rcu/tree.c:2494 rcu_core+0x5ad/0xe40 kernel/rcu/tree.c:2735 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2748 __do_softirq+0x268/0x5bb kernel/softirq.c:309 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu kernel/rcu/tree.c:2976 [inline] call_rcu+0x135/0x11f0 kernel/rcu/tree.c:3050 destroy_inode fs/inode.c:288 [inline] evict+0x8e8/0x9c0 fs/inode.c:629 dispose_list fs/inode.c:647 [inline] evict_inodes+0x638/0x6c0 fs/inode.c:701 generic_shutdown_super+0x97/0x320 fs/super.c:454 kill_block_super+0x7e/0xe0 fs/super.c:1469 kill_f2fs_super+0x2f9/0x3c0 fs/f2fs/super.c:4580 deactivate_locked_super+0xad/0x110 fs/super.c:335 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1118 __cleanup_mnt+0x19/0x20 fs/namespace.c:1125 task_work_run+0x129/0x190 kernel/task_work.c:189 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xbf/0xd0 kernel/entry/common.c:172 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0xa2/0x1a0 kernel/entry/common.c:274 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888128de99c0 which belongs to the cache f2fs_inode_cache of size 1520 The buggy address is located 1320 bytes inside of 1520-byte region [ffff888128de99c0, ffff888128de9fb0) The buggy address belongs to the page: page:ffffea0004a37a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x128de8 head:ffffea0004a37a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888102795680 raw: 0000000000000000 0000000080130013 00000001ffffffff 0000000000000000 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 921, ts 43203694051, free_ts 0 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5349 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2779 [inline] f2fs_alloc_inode+0x26/0x420 fs/f2fs/super.c:1373 alloc_inode fs/inode.c:233 [inline] iget_locked+0x14f/0x870 fs/inode.c:1275 f2fs_iget+0x55/0x50a0 fs/f2fs/inode.c:498 f2fs_fill_super+0x63b6/0x7d90 fs/f2fs/super.c:4301 mount_bdev+0x262/0x370 fs/super.c:1442 f2fs_mount+0x34/0x40 fs/f2fs/super.c:4548 legacy_get_tree+0xf1/0x190 fs/fs_context.c:593 vfs_get_tree+0x88/0x290 fs/super.c:1572 do_new_mount+0x2ba/0xb30 fs/namespace.c:2917 page_owner free stack trace missing Memory state around the buggy address: ffff888128de9d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888128de9e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888128de9e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888128de9f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888128de9f80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs (loop0): invalid journal inode EXT4-fs (loop0): can't get journal size ------------[ cut here ]------------ kernel BUG at fs/ext4/inode.c:585! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 1219 Comm: syz.0.380 Tainted: G B 5.10.236-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 RIP: 0010:ext4_map_blocks+0x1d04/0x1d10 fs/ext4/inode.c:585 Code: 4c 24 10 80 e1 07 80 c1 03 38 c1 0f 8c 6b f7 ff ff 48 8b 7c 24 10 e8 7b c9 cb ff e9 5c f7 ff ff e8 c1 46 d1 02 e8 7c 2a 8e ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 89 fb e8 63 RSP: 0018:ffffc90000da76c0 EFLAGS: 00010246 RAX: ffffffff81dc9574 RBX: ffffc90000da78c0 RCX: 0000000000080000 RDX: ffffc9000154b000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000da7830 R08: ffffffff81dc7af3 R09: ffffed10251bd469 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888128dea030 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f9d25ed66c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1ad187b178 CR3: 000000011b2bc000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_protect_reserved_inode fs/ext4/block_validity.c:168 [inline] ext4_setup_system_zone+0x7a6/0xb80 fs/ext4/block_validity.c:253 ext4_fill_super+0x7a19/0x9150 fs/ext4/super.c:4985 mount_bdev+0x262/0x370 fs/super.c:1442 ext4_mount+0x34/0x40 fs/ext4/super.c:6645 legacy_get_tree+0xf1/0x190 fs/fs_context.c:593 vfs_get_tree+0x88/0x290 fs/super.c:1572 do_new_mount+0x2ba/0xb30 fs/namespace.c:2917 path_mount+0x56f/0xcb0 fs/namespace.c:3247 do_mount fs/namespace.c:3260 [inline] __do_sys_mount fs/namespace.c:3468 [inline] __se_sys_mount+0x2c4/0x3b0 fs/namespace.c:3445 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3445 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f9d2786f10a 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:00007f9d25ed5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f9d25ed5ef0 RCX: 00007f9d2786f10a RDX: 00002000000000c0 RSI: 0000200000000040 RDI: 00007f9d25ed5eb0 RBP: 00002000000000c0 R08: 00007f9d25ed5ef0 R09: 0000000000000011 R10: 0000000000000011 R11: 0000000000000246 R12: 0000200000000040 R13: 00007f9d25ed5eb0 R14: 00000000000005fb R15: 0000200000000100 Modules linked in: ---[ end trace 0b8080411e323563 ]--- RIP: 0010:ext4_map_blocks+0x1d04/0x1d10 fs/ext4/inode.c:585 Code: 4c 24 10 80 e1 07 80 c1 03 38 c1 0f 8c 6b f7 ff ff 48 8b 7c 24 10 e8 7b c9 cb ff e9 5c f7 ff ff e8 c1 46 d1 02 e8 7c 2a 8e ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 89 fb e8 63 RSP: 0018:ffffc90000da76c0 EFLAGS: 00010246 RAX: ffffffff81dc9574 RBX: ffffc90000da78c0 RCX: 0000000000080000 RDX: ffffc9000154b000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000da7830 R08: ffffffff81dc7af3 R09: ffffed10251bd469 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888128dea030 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f9d25ed66c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1ad187b178 CR3: 000000011b2bc000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400