NILFS (loop5): invalid segment: Checksum error in segment payload NILFS (loop5): trying rollback from an earlier position ================================================================== BUG: KASAN: slab-out-of-bounds in nilfs_iget_test+0x3e4/0x440 fs/nilfs2/inode.c:544 Read of size 8 at addr ffff8880728b88e0 by task syz-executor.5/24925 CPU: 0 PID: 24925 Comm: syz-executor.5 Not tainted 6.3.0-rc2-syzkaller-00050-g9c1bec9c0b08 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 nilfs_iget_test+0x3e4/0x440 fs/nilfs2/inode.c:544 find_inode+0xe4/0x220 fs/inode.c:916 ilookup5_nowait fs/inode.c:1429 [inline] ilookup5 fs/inode.c:1458 [inline] iget5_locked+0xb5/0x2c0 fs/inode.c:1239 nilfs_iget_locked+0xa4/0xe0 fs/nilfs2/inode.c:605 nilfs_dat_read+0x88/0x370 fs/nilfs2/dat.c:508 nilfs_load_super_root fs/nilfs2/the_nilfs.c:121 [inline] load_nilfs+0x36c/0x1320 fs/nilfs2/the_nilfs.c:302 nilfs_fill_super fs/nilfs2/super.c:1068 [inline] nilfs_mount+0xb52/0x1150 fs/nilfs2/super.c:1324 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1501 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f8bc848d62a Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8bc918df88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000da6 RCX: 00007f8bc848d62a RDX: 00000000200000c0 RSI: 0000000020000100 RDI: 00007f8bc918dfe0 RBP: 00007f8bc918e020 R08: 00007f8bc918e020 R09: 0000000000004800 R10: 0000000000004800 R11: 0000000000000202 R12: 00000000200000c0 R13: 0000000020000100 R14: 00007f8bc918dfe0 R15: 0000000020000040 Allocated by task 15723: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:769 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc_lru+0x20a/0x600 mm/slub.c:3483 alloc_inode_sb include/linux/fs.h:2686 [inline] f2fs_alloc_inode+0x103/0x5c0 fs/f2fs/super.c:1371 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1bb/0x700 fs/inode.c:1287 f2fs_iget+0x63/0x5600 fs/f2fs/inode.c:504 f2fs_fill_super+0x2fe5/0x8bb0 fs/f2fs/super.c:4254 mount_bdev+0x351/0x410 fs/super.c:1371 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1501 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x7e0 kernel/rcu/tree.c:2622 destroy_inode+0x129/0x1b0 fs/inode.c:315 iput_final fs/inode.c:1748 [inline] iput.part.0+0x50a/0x740 fs/inode.c:1774 iput+0x5c/0x80 fs/inode.c:1764 f2fs_put_super+0x4f7/0xc50 fs/f2fs/super.c:1600 generic_shutdown_super+0x158/0x480 fs/super.c:491 kill_block_super+0x9b/0xf0 fs/super.c:1398 kill_f2fs_super+0x2af/0x3c0 fs/f2fs/super.c:4635 deactivate_locked_super+0x98/0x160 fs/super.c:331 deactivate_super+0xb1/0xd0 fs/super.c:362 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1177 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x7e0 kernel/rcu/tree.c:2622 destroy_inode+0x129/0x1b0 fs/inode.c:315 iput_final fs/inode.c:1748 [inline] iput.part.0+0x50a/0x740 fs/inode.c:1774 iput+0x5c/0x80 fs/inode.c:1764 f2fs_fill_super+0x4520/0x8bb0 fs/f2fs/super.c:4539 mount_bdev+0x351/0x410 fs/super.c:1371 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1501 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880728b8000 which belongs to the cache f2fs_inode_cache of size 2152 The buggy address is located 120 bytes to the right of allocated 2152-byte region [ffff8880728b8000, ffff8880728b8868) The buggy address belongs to the physical page: page:ffffea0001ca2e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880728b8000 pfn:0x728b8 head:ffffea0001ca2e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88807e46f201 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff88814606ddc0 0000000000000000 0000000000000001 raw: ffff8880728b8000 00000000800e0001 00000001ffffffff ffff88807e46f201 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 6932, tgid 6931 (syz-executor.1), ts 310586874546, free_ts 289228588941 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4325 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5591 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc_lru+0x4a8/0x600 mm/slub.c:3483 alloc_inode_sb include/linux/fs.h:2686 [inline] f2fs_alloc_inode+0x103/0x5c0 fs/f2fs/super.c:1371 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1bb/0x700 fs/inode.c:1287 f2fs_iget+0x63/0x5600 fs/f2fs/inode.c:504 f2fs_fill_super+0x3b9e/0x8bb0 fs/f2fs/super.c:4356 mount_bdev+0x351/0x410 fs/super.c:1371 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1501 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare+0x5d5/0xa50 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3482 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2637 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:769 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3476 inotify_new_watch fs/notify/inotify/inotify_user.c:600 [inline] inotify_update_watch+0x530/0xc30 fs/notify/inotify/inotify_user.c:648 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:787 [inline] __se_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:730 [inline] __x64_sys_inotify_add_watch+0x2bf/0x350 fs/notify/inotify/inotify_user.c:730 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880728b8780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880728b8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc >ffff8880728b8880: fc fc fc fc fc fc fc fc fc fc fc fc fc 00 00 00 ^ ffff8880728b8900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880728b8980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================