================================================================== BUG: KASAN: use-after-free in sanity_check_inode fs/f2fs/inode.c:285 [inline] BUG: KASAN: use-after-free in do_read_inode fs/f2fs/inode.c:423 [inline] BUG: KASAN: use-after-free in f2fs_iget+0x4295/0x4af0 fs/f2fs/inode.c:522 Read of size 4 at addr ffff88812ec57878 by task syz.2.19/544 CPU: 0 PID: 544 Comm: syz.2.19 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x100/0x140 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 sanity_check_inode fs/f2fs/inode.c:285 [inline] do_read_inode fs/f2fs/inode.c:423 [inline] f2fs_iget+0x4295/0x4af0 fs/f2fs/inode.c:522 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 lookup_open fs/namei.c:3276 [inline] open_last_lookups fs/namei.c:3367 [inline] path_openat+0x145d/0x3040 fs/namei.c:3556 do_filp_open+0x1df/0x400 fs/namei.c:3586 do_sys_openat2+0x19f/0x750 fs/open.c:1219 do_sys_open fs/open.c:1235 [inline] __do_sys_openat fs/open.c:1251 [inline] __se_sys_openat fs/open.c:1246 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1246 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f0347a57339 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f034789b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f0347c93090 RCX: 00007f0347a57339 RDX: 0000000000101000 RSI: 0000200000000080 RDI: ffffffffffffff9c RBP: 00007f0347aead68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0347c93128 R14: 00007f0347c93090 R15: 00007ffe91e80188 Allocated by task 528: 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+0xb7/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline] __grab_extent_tree fs/f2fs/extent_cache.c:295 [inline] __f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline] f2fs_init_extent_tree+0x502/0xc90 fs/f2fs/extent_cache.c:404 do_read_inode fs/f2fs/inode.c:400 [inline] f2fs_iget+0xf7d/0x4af0 fs/f2fs/inode.c:522 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 __lookup_slow+0x2b8/0x410 fs/namei.c:1648 lookup_slow+0x57/0x70 fs/namei.c:1665 walk_component+0x326/0x460 fs/namei.c:1960 lookup_last fs/namei.c:2411 [inline] path_lookupat+0x155/0x430 fs/namei.c:2435 filename_lookup+0x1fd/0x660 fs/namei.c:2468 user_path_at_empty+0x43/0x50 fs/namei.c:2790 user_path_at include/linux/namei.h:60 [inline] do_sys_truncate+0xb6/0x1c0 fs/open.c:132 __do_sys_truncate fs/open.c:146 [inline] __se_sys_truncate fs/open.c:144 [inline] __x64_sys_truncate+0x5b/0x70 fs/open.c:144 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 528: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/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:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kmem_cache_free+0x100/0x2d0 mm/slub.c:3224 f2fs_destroy_extent_tree+0x2d7/0x4e0 fs/f2fs/extent_cache.c:845 f2fs_evict_inode+0x3fe/0x14a0 fs/f2fs/inode.c:779 evict+0x4a9/0x940 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x654/0x7e0 fs/inode.c:1762 iget_failed+0x162/0x1a0 fs/bad_inode.c:242 f2fs_iget+0x165b/0x4af0 fs/f2fs/inode.c:575 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 __lookup_slow+0x2b8/0x410 fs/namei.c:1648 lookup_slow+0x57/0x70 fs/namei.c:1665 walk_component+0x326/0x460 fs/namei.c:1960 lookup_last fs/namei.c:2411 [inline] path_lookupat+0x155/0x430 fs/namei.c:2435 filename_lookup+0x1fd/0x660 fs/namei.c:2468 user_path_at_empty+0x43/0x50 fs/namei.c:2790 user_path_at include/linux/namei.h:60 [inline] do_sys_truncate+0xb6/0x1c0 fs/open.c:132 __do_sys_truncate fs/open.c:146 [inline] __se_sys_truncate fs/open.c:144 [inline] __x64_sys_truncate+0x5b/0x70 fs/open.c:144 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88812ec57850 which belongs to the cache f2fs_extent_tree of size 80 The buggy address is located 40 bytes inside of 80-byte region [ffff88812ec57850, ffff88812ec578a0) The buggy address belongs to the page: page:ffffea0004bb15c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12ec57 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff8881029c7800 raw: 0000000000000000 0000000080240024 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 528, ts 41543487001, 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+0x176/0x190 mm/page_alloc.c:2462 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline] __grab_extent_tree fs/f2fs/extent_cache.c:295 [inline] __f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline] f2fs_init_extent_tree+0x502/0xc90 fs/f2fs/extent_cache.c:404 do_read_inode fs/f2fs/inode.c:400 [inline] f2fs_iget+0xf7d/0x4af0 fs/f2fs/inode.c:522 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 __lookup_slow+0x2b8/0x410 fs/namei.c:1648 lookup_slow+0x57/0x70 fs/namei.c:1665 walk_component+0x326/0x460 fs/namei.c:1960 lookup_last fs/namei.c:2411 [inline] path_lookupat+0x155/0x430 fs/namei.c:2435 filename_lookup+0x1fd/0x660 fs/namei.c:2468 user_path_at_empty+0x43/0x50 fs/namei.c:2790 page_owner free stack trace missing Memory state around the buggy address: ffff88812ec57700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88812ec57780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88812ec57800: fc fc fc fc fc fc fc fc fc fc fa fb fb fb fb fb ^ ffff88812ec57880: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff88812ec57900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== F2FS-fs (loop2): sanity_check_inode: inode (ino=8) extent info [14338, 0, 2147549187] is incorrect, run fsck to fix ================================================================== BUG: KASAN: double-free or invalid-free in slab_free mm/slub.c:3208 [inline] BUG: KASAN: double-free or invalid-free in kmem_cache_free+0x100/0x2d0 mm/slub.c:3224 CPU: 0 PID: 544 Comm: syz.2.19 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 kasan_report_invalid_free+0x3f/0x70 mm/kasan/report.c:374 ____kasan_slab_free+0x13d/0x160 mm/kasan/common.c:-1 __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:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kmem_cache_free+0x100/0x2d0 mm/slub.c:3224 f2fs_destroy_extent_tree+0x2d7/0x4e0 fs/f2fs/extent_cache.c:845 f2fs_evict_inode+0x3fe/0x14a0 fs/f2fs/inode.c:779 evict+0x4a9/0x940 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x654/0x7e0 fs/inode.c:1762 iget_failed+0x162/0x1a0 fs/bad_inode.c:242 f2fs_iget+0x165b/0x4af0 fs/f2fs/inode.c:575 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 lookup_open fs/namei.c:3276 [inline] open_last_lookups fs/namei.c:3367 [inline] path_openat+0x145d/0x3040 fs/namei.c:3556 do_filp_open+0x1df/0x400 fs/namei.c:3586 do_sys_openat2+0x19f/0x750 fs/open.c:1219 do_sys_open fs/open.c:1235 [inline] __do_sys_openat fs/open.c:1251 [inline] __se_sys_openat fs/open.c:1246 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1246 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f0347a57339 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f034789b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f0347c93090 RCX: 00007f0347a57339 RDX: 0000000000101000 RSI: 0000200000000080 RDI: ffffffffffffff9c RBP: 00007f0347aead68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0347c93128 R14: 00007f0347c93090 R15: 00007ffe91e80188 Allocated by task 528: 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+0xb7/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline] __grab_extent_tree fs/f2fs/extent_cache.c:295 [inline] __f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline] f2fs_init_extent_tree+0x502/0xc90 fs/f2fs/extent_cache.c:404 do_read_inode fs/f2fs/inode.c:400 [inline] f2fs_iget+0xf7d/0x4af0 fs/f2fs/inode.c:522 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 __lookup_slow+0x2b8/0x410 fs/namei.c:1648 lookup_slow+0x57/0x70 fs/namei.c:1665 walk_component+0x326/0x460 fs/namei.c:1960 lookup_last fs/namei.c:2411 [inline] path_lookupat+0x155/0x430 fs/namei.c:2435 filename_lookup+0x1fd/0x660 fs/namei.c:2468 user_path_at_empty+0x43/0x50 fs/namei.c:2790 user_path_at include/linux/namei.h:60 [inline] do_sys_truncate+0xb6/0x1c0 fs/open.c:132 __do_sys_truncate fs/open.c:146 [inline] __se_sys_truncate fs/open.c:144 [inline] __x64_sys_truncate+0x5b/0x70 fs/open.c:144 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 528: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/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:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kmem_cache_free+0x100/0x2d0 mm/slub.c:3224 f2fs_destroy_extent_tree+0x2d7/0x4e0 fs/f2fs/extent_cache.c:845 f2fs_evict_inode+0x3fe/0x14a0 fs/f2fs/inode.c:779 evict+0x4a9/0x940 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x654/0x7e0 fs/inode.c:1762 iget_failed+0x162/0x1a0 fs/bad_inode.c:242 f2fs_iget+0x165b/0x4af0 fs/f2fs/inode.c:575 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 __lookup_slow+0x2b8/0x410 fs/namei.c:1648 lookup_slow+0x57/0x70 fs/namei.c:1665 walk_component+0x326/0x460 fs/namei.c:1960 lookup_last fs/namei.c:2411 [inline] path_lookupat+0x155/0x430 fs/namei.c:2435 filename_lookup+0x1fd/0x660 fs/namei.c:2468 user_path_at_empty+0x43/0x50 fs/namei.c:2790 user_path_at include/linux/namei.h:60 [inline] do_sys_truncate+0xb6/0x1c0 fs/open.c:132 __do_sys_truncate fs/open.c:146 [inline] __se_sys_truncate fs/open.c:144 [inline] __x64_sys_truncate+0x5b/0x70 fs/open.c:144 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88812ec57850 which belongs to the cache f2fs_extent_tree of size 80 The buggy address is located 0 bytes inside of 80-byte region [ffff88812ec57850, ffff88812ec578a0) The buggy address belongs to the page: page:ffffea0004bb15c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12ec57 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff8881029c7800 raw: 0000000000000000 0000000080240024 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 528, ts 41543487001, 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+0x176/0x190 mm/page_alloc.c:2462 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline] __grab_extent_tree fs/f2fs/extent_cache.c:295 [inline] __f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline] f2fs_init_extent_tree+0x502/0xc90 fs/f2fs/extent_cache.c:404 do_read_inode fs/f2fs/inode.c:400 [inline] f2fs_iget+0xf7d/0x4af0 fs/f2fs/inode.c:522 f2fs_lookup+0x419/0xd20 fs/f2fs/namei.c:544 __lookup_slow+0x2b8/0x410 fs/namei.c:1648 lookup_slow+0x57/0x70 fs/namei.c:1665 walk_component+0x326/0x460 fs/namei.c:1960 lookup_last fs/namei.c:2411 [inline] path_lookupat+0x155/0x430 fs/namei.c:2435 filename_lookup+0x1fd/0x660 fs/namei.c:2468 user_path_at_empty+0x43/0x50 fs/namei.c:2790 page_owner free stack trace missing Memory state around the buggy address: ffff88812ec57700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88812ec57780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88812ec57800: fc fc fc fc fc fc fc fc fc fc fa fb fb fb fb fb ^ ffff88812ec57880: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff88812ec57900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================