F2FS-fs (loop1): invalid crc value F2FS-fs (loop1): Mismatch valid blocks 1 vs. 2 F2FS-fs (loop1): Failed to initialize F2FS segment manager (-117) ================================================================== BUG: KASAN: slab-use-after-free in destroy_device_list+0x195/0x200 fs/f2fs/super.c:1606 Read of size 4 at addr ffff888121eb977c by task syz-executor.1/13211 CPU: 2 PID: 13211 Comm: syz-executor.1 Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #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:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 destroy_device_list+0x195/0x200 fs/f2fs/super.c:1606 kill_f2fs_super+0x2c6/0x430 fs/f2fs/super.c:4932 deactivate_locked_super+0xbc/0x1a0 fs/super.c:477 mount_bdev+0x277/0x2d0 fs/super.c:1665 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8c/0x370 fs/super.c:1784 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f091da7e4aa 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:00007f091e8d5ef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f091e8d5f80 RCX: 00007f091da7e4aa RDX: 00000000200000c0 RSI: 0000000020010280 RDI: 00007f091e8d5f40 RBP: 00000000200000c0 R08: 00007f091e8d5f80 R09: 0000000000000410 R10: 0000000000000410 R11: 0000000000000202 R12: 0000000020010280 R13: 00007f091e8d5f40 R14: 0000000000007e6b R15: 0000000020007f80 Allocated by task 13211: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:372 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:389 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:711 [inline] f2fs_fill_super+0xfe/0x8e50 fs/f2fs/super.c:4397 mount_bdev+0x1df/0x2d0 fs/super.c:1663 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8c/0x370 fs/super.c:1784 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 13211: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kfree+0x124/0x360 mm/slub.c:4409 f2fs_fill_super+0x270c/0x8e50 fs/f2fs/super.c:4882 mount_bdev+0x1df/0x2d0 fs/super.c:1663 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8c/0x370 fs/super.c:1784 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff888121eb8000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 6012 bytes inside of freed 8192-byte region [ffff888121eb8000, ffff888121eba000) The buggy address belongs to the physical page: page:ffffea000487ae00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x121eb8 head:ffffea000487ae00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x57ff00000000840(slab|head|node=1|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 057ff00000000840 ffff888013043180 ffffea000078ec00 dead000000000002 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 6480, tgid 6479 (syz-executor.2), ts 224841890568, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] __do_kmalloc_node mm/slub.c:3980 [inline] __kmalloc_node+0x35d/0x460 mm/slub.c:3988 kmalloc_node include/linux/slab.h:610 [inline] alloc_callchain_buffers kernel/events/callchain.c:90 [inline] get_callchain_buffers+0x1f0/0x460 kernel/events/callchain.c:134 stack_map_alloc+0x2f9/0x640 kernel/bpf/stackmap.c:107 map_create+0x548/0x1b90 kernel/bpf/syscall.c:1237 __sys_bpf+0xa32/0x4a00 kernel/bpf/syscall.c:5439 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline] __se_sys_bpf kernel/bpf/syscall.c:5559 [inline] __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5559 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b page_owner free stack trace missing Memory state around the buggy address: ffff888121eb9600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888121eb9680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888121eb9700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888121eb9780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888121eb9800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================