do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 ================================================================== BUG: KASAN: slab-out-of-bounds in f2fs_truncate_data_blocks_range+0x81f/0xf90 fs/f2fs/file.c:562 Read of size 4 at addr ffff8881ed0420e8 by task syz-executor.5/15969 CPU: 1 PID: 15969 Comm: syz-executor.5 Not tainted 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 f2fs_truncate_data_blocks_range+0x81f/0xf90 fs/f2fs/file.c:562 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Allocated by task 491: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xd9/0x250 mm/slub.c:2842 vm_area_alloc+0x20/0xe0 kernel/fork.c:350 mmap_region+0x989/0x16f0 mm/mmap.c:1779 do_mmap+0x822/0xd30 mm/mmap.c:1578 do_mmap_pgoff include/linux/mm.h:2478 [inline] vm_mmap_pgoff+0x1b5/0x260 mm/util.c:528 ksys_mmap_pgoff+0x168/0x1e0 mm/mmap.c:1628 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 156: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1b5/0x270 mm/kasan/common.c:487 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook mm/slub.c:1494 [inline] slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10b/0x2c0 mm/slub.c:3096 remove_vma mm/mmap.c:181 [inline] exit_mmap+0x415/0x520 mm/mmap.c:3197 __mmput+0x8e/0x2c0 kernel/fork.c:1093 exit_mm kernel/exit.c:536 [inline] do_exit+0xc08/0x2bc0 kernel/exit.c:846 do_group_exit+0x138/0x300 kernel/exit.c:982 __do_sys_exit_group kernel/exit.c:993 [inline] __se_sys_exit_group kernel/exit.c:991 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:991 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881ed042000 which belongs to the cache vm_area_struct of size 232 The buggy address is located 0 bytes to the right of 232-byte region [ffff8881ed042000, ffff8881ed0420e8) The buggy address belongs to the page: page:ffffea0007b41080 refcount:1 mapcount:0 mapping:ffff8881f5cf2780 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 0000000000000000 0000000400000001 ffff8881f5cf2780 raw: 0000000000000000 00000000000d000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4891 alloc_slab_page+0x39/0x3c0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x97/0x440 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x2fe/0x490 mm/slub.c:2667 __slab_alloc+0x62/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x109/0x250 mm/slub.c:2842 vm_area_dup+0x20/0xa0 kernel/fork.c:358 __split_vma+0xb3/0x430 mm/mmap.c:2702 mprotect_fixup+0x5b2/0x7a0 mm/mprotect.c:447 do_mprotect_pkey+0x731/0x990 mm/mprotect.c:587 __do_sys_mprotect mm/mprotect.c:612 [inline] __se_sys_mprotect mm/mprotect.c:609 [inline] __x64_sys_mprotect+0x7c/0x90 mm/mprotect.c:609 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] free_pcp_prepare mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x297/0x380 mm/page_alloc.c:3085 free_unref_page_list+0x10a/0x590 mm/page_alloc.c:3154 release_pages+0xad8/0xb20 mm/swap.c:842 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:189 [inline] tlb_flush_mmu mm/mmu_gather.c:196 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:277 exit_mmap+0x2dc/0x520 mm/mmap.c:3188 __mmput+0x8e/0x2c0 kernel/fork.c:1093 exit_mm kernel/exit.c:536 [inline] do_exit+0xc08/0x2bc0 kernel/exit.c:846 do_group_exit+0x138/0x300 kernel/exit.c:982 __do_sys_exit_group kernel/exit.c:993 [inline] __se_sys_exit_group kernel/exit.c:991 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:991 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881ed041f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881ed042000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881ed042080: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ^ ffff8881ed042100: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ffff8881ed042180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== F2FS-fs (loop5): access invalid blkaddr:491 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:3577741551 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:156 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:2743075061 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:2005520384 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:32538 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:2007617536 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:32538 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:3976472600 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:4294936705 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:3976470528 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:4294936705 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:3976470561 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): access invalid blkaddr:4294936705 CPU: 1 PID: 15969 Comm: syz-executor.5 Tainted: G B 5.4.233-syzkaller-00005-g3ca47ce937f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 f2fs_is_valid_blkaddr+0xc79/0x1380 fs/f2fs/checkpoint.c:203 f2fs_truncate_data_blocks_range+0x66f/0xf90 fs/f2fs/file.c:580 truncate_dnode fs/f2fs/node.c:907 [inline] f2fs_truncate_inode_blocks+0x779/0x1390 fs/f2fs/node.c:1117 f2fs_do_truncate_blocks+0x614/0xac0 fs/f2fs/file.c:708 f2fs_truncate_blocks fs/f2fs/file.c:736 [inline] f2fs_truncate+0x275/0x540 fs/f2fs/file.c:780 f2fs_setattr+0x9a4/0x1040 fs/f2fs/file.c:944 notify_change+0xbaf/0xe40 fs/attr.c:338 do_truncate+0x1ed/0x2d0 fs/open.c:64 handle_truncate fs/namei.c:3083 [inline] do_last fs/namei.c:3501 [inline] path_openat+0x2de2/0x3480 fs/namei.c:3614 do_filp_open+0x20b/0x450 fs/namei.c:3644 do_sys_open+0x39c/0x810 fs/open.c:1113 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 F2FS-fs (loop5): Inconsistent i_blocks, ino:8, iblocks:0, sectors:16 F2FS-fs (loop5): dec_valid_node_count: inconsistent i_blocks, ino:8, iblocks:0