loop1: detected capacity change from 0 to 262144 F2FS-fs (loop1): invalid crc value ================================================================== BUG: KASAN: slab-out-of-bounds in sanity_check_valid_blocks fs/f2fs/segment.h:385 [inline] BUG: KASAN: slab-out-of-bounds in build_sit_entries+0x1b0c/0x1f80 fs/f2fs/segment.c:5060 Read of size 4 at addr ffff8880561dea20 by task syz.1.166/6699 CPU: 1 UID: 0 PID: 6699 Comm: syz.1.166 Not tainted 6.15.0-rc7-next-20250522-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 sanity_check_valid_blocks fs/f2fs/segment.h:385 [inline] build_sit_entries+0x1b0c/0x1f80 fs/f2fs/segment.c:5060 f2fs_build_segment_manager+0x3112/0x49f0 fs/f2fs/segment.c:5707 f2fs_fill_super+0x45bc/0x6c80 fs/f2fs/super.c:4754 mount_bdev+0x211/0x2c0 fs/super.c:1736 legacy_get_tree+0xfd/0x1a0 fs/fs_context.c:666 vfs_get_tree+0x92/0x2b0 fs/super.c:1802 do_new_mount+0x24a/0xa40 fs/namespace.c:3869 do_mount fs/namespace.c:4206 [inline] __do_sys_mount fs/namespace.c:4417 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4394 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7efff879010a 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:00007efff95b7e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007efff95b7ef0 RCX: 00007efff879010a RDX: 0000200000020440 RSI: 0000200000020480 RDI: 00007efff95b7eb0 RBP: 0000200000020440 R08: 00007efff95b7ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000020480 R13: 00007efff95b7eb0 R14: 0000000000020442 R15: 0000200000000000 Allocated by task 6699: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kvmalloc_node_noprof+0x30d/0x5f0 mm/slub.c:5014 f2fs_kvmalloc fs/f2fs/f2fs.h:3527 [inline] f2fs_kvzalloc fs/f2fs/f2fs.h:3533 [inline] build_sit_info fs/f2fs/segment.c:4779 [inline] f2fs_build_segment_manager+0x1485/0x49f0 fs/f2fs/segment.c:5696 f2fs_fill_super+0x45bc/0x6c80 fs/f2fs/super.c:4754 mount_bdev+0x211/0x2c0 fs/super.c:1736 legacy_get_tree+0xfd/0x1a0 fs/fs_context.c:666 vfs_get_tree+0x92/0x2b0 fs/super.c:1802 do_new_mount+0x24a/0xa40 fs/namespace.c:3869 do_mount fs/namespace.c:4206 [inline] __do_sys_mount fs/namespace.c:4417 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4394 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880561de000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 0 bytes to the right of allocated 2592-byte region [ffff8880561de000, ffff8880561dea20) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x561d8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a442140 ffffea0000ce0e00 dead000000000002 raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801a442140 ffffea0000ce0e00 dead000000000002 head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001587601 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 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 5836, tgid 5836 (udevd), ts 112521870441, free_ts 103350860334 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2618 new_slab mm/slub.c:2672 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3858 __slab_alloc mm/slub.c:3948 [inline] __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x305/0x4f0 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x1e8/0x5a0 security/tomoyo/file.c:723 tomoyo_path_mknod+0x142/0x190 security/tomoyo/tomoyo.c:252 security_path_mknod+0x17e/0x3a0 security/security.c:1899 may_o_create fs/namei.c:3527 [inline] lookup_open fs/namei.c:3671 [inline] open_last_lookups fs/namei.c:3807 [inline] path_openat+0xd56/0x3830 fs/namei.c:4043 do_filp_open+0x1fa/0x410 fs/namei.c:4073 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1463 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 page last free pid 49 tgid 49 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706 discard_slab mm/slub.c:2716 [inline] __put_partials+0x161/0x1c0 mm/slub.c:3185 put_cpu_partial+0x17c/0x250 mm/slub.c:3260 __slab_free+0x2f7/0x400 mm/slub.c:4512 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __kmalloc_cache_noprof+0x1be/0x3d0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] mld_add_delrec net/ipv6/mcast.c:746 [inline] igmp6_leave_group net/ipv6/mcast.c:2676 [inline] igmp6_group_dropped+0x3ac/0xf10 net/ipv6/mcast.c:726 __ipv6_dev_mc_dec+0x2d2/0x390 net/ipv6/mcast.c:1018 addrconf_leave_solict net/ipv6/addrconf.c:2254 [inline] __ipv6_ifa_notify+0x43d/0xac0 net/ipv6/addrconf.c:6302 addrconf_ifdown+0xe69/0x1880 net/ipv6/addrconf.c:3981 addrconf_notify+0x1bc/0x1010 net/ipv6/addrconf.c:-1 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] dev_close_many+0x29c/0x410 net/core/dev.c:1785 unregister_netdevice_many_notify+0x834/0x2320 net/core/dev.c:12039 Memory state around the buggy address: ffff8880561de900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880561de980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880561dea00: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880561dea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880561deb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================