F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop0): invalid crc value F2FS-fs (loop0): SIT is corrupted node# 0 vs 1 F2FS-fs (loop0): Failed to initialize F2FS segment manager (-117) ================================================================== BUG: KASAN: slab-use-after-free in destroy_device_list fs/f2fs/super.c:1611 [inline] BUG: KASAN: slab-use-after-free in kill_f2fs_super+0x481/0x500 fs/f2fs/super.c:4933 Read of size 4 at addr ffff888173911774 by task syz-executor.0/2556 CPU: 1 PID: 2556 Comm: syz-executor.0 Not tainted 6.7.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xf8/0x260 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 destroy_device_list fs/f2fs/super.c:1611 [inline] kill_f2fs_super+0x481/0x500 fs/f2fs/super.c:4933 deactivate_locked_super+0x9e/0x270 fs/super.c:484 mount_bdev+0x1e5/0x290 fs/super.c:1652 legacy_get_tree+0xe9/0x170 fs/fs_context.c:662 vfs_get_tree+0x7e/0x190 fs/super.c:1771 do_new_mount+0x1e5/0x930 fs/namespace.c:3337 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount+0x242/0x2d0 fs/namespace.c:3863 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0xe0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f9fa447e4aa 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:00007f9fa5203ef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f9fa5203f80 RCX: 00007f9fa447e4aa RDX: 00000000200000c0 RSI: 0000000020007f80 RDI: 00007f9fa5203f40 RBP: 00000000200000c0 R08: 00007f9fa5203f80 R09: 0000000000000010 R10: 0000000000000010 R11: 0000000000000246 R12: 0000000020007f80 R13: 00007f9fa5203f40 R14: 0000000000007e7b R15: 0000000020000900 Allocated by task 2556: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] f2fs_fill_super+0xc2/0x7970 fs/f2fs/super.c:4397 mount_bdev+0x1d6/0x290 fs/super.c:1650 legacy_get_tree+0xe9/0x170 fs/fs_context.c:662 vfs_get_tree+0x7e/0x190 fs/super.c:1771 do_new_mount+0x1e5/0x930 fs/namespace.c:3337 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount+0x242/0x2d0 fs/namespace.c:3863 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0xe0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 2556: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522 ____kasan_slab_free+0x122/0x1e0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook mm/slub.c:1826 [inline] slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0x2bc/0x470 mm/slub.c:3822 f2fs_fill_super+0x4bff/0x7970 fs/f2fs/super.c:4883 mount_bdev+0x1d6/0x290 fs/super.c:1650 legacy_get_tree+0xe9/0x170 fs/fs_context.c:662 vfs_get_tree+0x7e/0x190 fs/super.c:1771 do_new_mount+0x1e5/0x930 fs/namespace.c:3337 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount+0x242/0x2d0 fs/namespace.c:3863 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0xe0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff888173910000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 6004 bytes inside of freed 8192-byte region [ffff888173910000, ffff888173912000) The buggy address belongs to the physical page: page:ffffea0005ce4400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x173910 head:ffffea0005ce4400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x100000000000840(slab|head|node=0|zone=2) page_type: 0xffffffff() raw: 0100000000000840 ffff888100042280 0000000000000000 0000000000000001 raw: 0000000000000000 0000000080020002 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1597, tgid 1597 (sh), ts 22557448504, free_ts 22556863882 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x10b/0x130 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x3e5f/0x4080 mm/page_alloc.c:3312 __alloc_pages+0x255/0x650 mm/page_alloc.c:4568 alloc_pages_mpol+0x27f/0x4d0 mm/mempolicy.c:2133 alloc_slab_page+0x6a/0x170 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x70/0x270 mm/slub.c:2070 ___slab_alloc+0x94b/0xee0 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1f7/0x2c0 mm/slub.c:3517 kmalloc_trace+0x2a/0xc0 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0x10ad/0x1fe0 security/tomoyo/audit.c:264 tomoyo_supervisor+0x312/0xfa0 security/tomoyo/common.c:2089 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x131/0x1e0 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xf49/0x1700 security/tomoyo/domain.c:878 tomoyo_bprm_check_security+0xfa/0x130 security/tomoyo/tomoyo.c:101 security_bprm_check+0x27/0x80 security/security.c:1103 search_binary_handler fs/exec.c:1725 [inline] exec_binprm fs/exec.c:1779 [inline] bprm_execve+0x87b/0x13a0 fs/exec.c:1854 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x7e3/0x900 mm/page_alloc.c:2347 free_unref_page+0x37/0x3a0 mm/page_alloc.c:2487 discard_slab mm/slub.c:2116 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2655 put_cpu_partial+0x150/0x1b0 mm/slub.c:2731 __slab_free+0x26b/0x330 mm/slub.c:3679 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:294 ____kasan_kmalloc mm/kasan/common.c:340 [inline] __kasan_kmalloc+0x23/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0x10ad/0x1fe0 security/tomoyo/audit.c:264 tomoyo_supervisor+0x312/0xfa0 security/tomoyo/common.c:2089 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x131/0x1e0 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xf49/0x1700 security/tomoyo/domain.c:878 tomoyo_bprm_check_security+0xfa/0x130 security/tomoyo/tomoyo.c:101 security_bprm_check+0x27/0x80 security/security.c:1103 search_binary_handler fs/exec.c:1725 [inline] exec_binprm fs/exec.c:1779 [inline] bprm_execve+0x87b/0x13a0 fs/exec.c:1854 do_execveat_common+0x44f/0x610 fs/exec.c:1962 Memory state around the buggy address: ffff888173911600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888173911680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888173911700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888173911780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888173911800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================