syzbot


KASAN: use-after-free Read in f2fs_truncate_data_blocks_range

Status: upstream: reported C repro on 2023/05/12 15:50
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+33be3c5ec9ecadd6fe14@syzkaller.appspotmail.com
First crash: 381d, last: 19d
Cause bisection: failed (error log, bisect log)
  
Bug presence (4)
Date Name Commit Repro Result
2023/08/11 android14-6.1 (ToT) d7dacaa439c7 C [report] KASAN: slab-out-of-bounds Read in f2fs_truncate_data_blocks_range
2023/05/12 lts (merge base) be100a8460e3 C [report] KASAN: use-after-free Read in f2fs_truncate_data_blocks_range
2023/05/12 upstream (ToT) 47a2ee5d4a0b C [report] KASAN: slab-use-after-free Read in f2fs_truncate_data_blocks_range
2023/08/11 upstream (ToT) 29d99aae13cf C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 KASAN: use-after-free Read in f2fs_truncate_data_blocks_range C error 1 30d 381d 0/2 upstream: reported C repro on 2023/05/12 18:24
android-54 KASAN: use-after-free Read in f2fs_truncate_data_blocks_range C 3 19d 381d 0/2 upstream: reported C repro on 2023/05/12 11:37
upstream KASAN: slab-use-after-free Read in f2fs_truncate_data_blocks_range f2fs C error 1 341d 337d 23/26 fixed on 2023/10/12 12:47
Fix bisection attempts (10)
Created Duration User Patch Repo Result
2024/05/09 02:14 48m bisect fix android14-6.1 job log (0) log
2024/04/04 12:47 4h47m bisect fix android14-6.1 job log (0) log
2024/03/05 07:32 55m bisect fix android14-6.1 job log (0) log
2024/01/27 19:58 47m bisect fix android14-6.1 job log (0) log
2023/12/27 12:19 46m bisect fix android14-6.1 job log (0) log
2023/11/27 05:50 1h13m bisect fix android14-6.1 job log (0) log
2023/10/27 13:50 50m bisect fix android14-6.1 job log (0) log
2023/09/24 00:01 50m bisect fix android14-6.1 job log (0) log
2023/08/11 07:30 1h51m bisect fix android14-6.1 job log (0) log
2023/06/22 22:23 26m bisect fix android14-6.1 job log (0) log

Sample crash report:
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
==================================================================
BUG: KASAN: use-after-free in f2fs_truncate_data_blocks_range+0x7f0/0xec0 fs/f2fs/file.c:574
Read of size 4 at addr ffff888120768000 by task syz-executor119/312

CPU: 1 PID: 312 Comm: syz-executor119 Not tainted 6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x158/0x4e0 mm/kasan/report.c:395
 kasan_report+0x13c/0x170 mm/kasan/report.c:495
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350
 f2fs_truncate_data_blocks_range+0x7f0/0xec0 fs/f2fs/file.c:574
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>

The buggy address belongs to the physical page:
page:ffffea000481da00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x120768
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea000481d988 ffffea000481da48 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x500cc2(GFP_HIGHUSER|__GFP_ACCOUNT), pid 224, tgid 224 (sshd), ts 13605939035, free_ts 13607032089
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x213/0x220 mm/page_alloc.c:2567
 prep_new_page mm/page_alloc.c:2574 [inline]
 get_page_from_freelist+0x2386/0x2460 mm/page_alloc.c:4365
 __alloc_pages+0x3a1/0x780 mm/page_alloc.c:5630
 __alloc_pages_node include/linux/gfp.h:236 [inline]
 alloc_pages_node include/linux/gfp.h:259 [inline]
 alloc_pages include/linux/gfp.h:270 [inline]
 pipe_write+0x56a/0x1960 fs/pipe.c:496
 call_write_iter include/linux/fs.h:2212 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x8d1/0xe80 fs/read_write.c:584
 ksys_write+0x199/0x2c0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1480 [inline]
 free_pcp_prepare mm/page_alloc.c:1553 [inline]
 free_unref_page_prepare+0x83d/0x850 mm/page_alloc.c:3466
 free_unref_page+0x8d/0x480 mm/page_alloc.c:3562
 __folio_put_small mm/swap.c:105 [inline]
 __folio_put+0xaa/0xe0 mm/swap.c:128
 folio_put include/linux/mm.h:1165 [inline]
 put_page include/linux/mm.h:1217 [inline]
 anon_pipe_buf_release+0x184/0x1f0 fs/pipe.c:138
 pipe_buf_release include/linux/pipe_fs_i.h:183 [inline]
 pipe_read+0x5a6/0x1040 fs/pipe.c:324
 call_read_iter include/linux/fs.h:2206 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x771/0xad0 fs/read_write.c:470
 ksys_read+0x199/0x2c0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x7b/0x90 fs/read_write.c:621
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Memory state around the buggy address:
 ffff888120767f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888120767f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888120768000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff888120768080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888120768100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
F2FS-fs (loop0): access invalid blkaddr:370
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:11187248
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:26
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:10725585
CPU: 0 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:7
CPU: 0 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:23824608
CPU: 0 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:3
CPU: 0 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:3
CPU: 0 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:370
CPU: 0 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:11212058
CPU: 0 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:27
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:10725585
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:7
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:23824736
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:3
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): access invalid blkaddr:3
CPU: 1 PID: 312 Comm: syz-executor119 Tainted: G    B              6.1.25-syzkaller-00144-gaf58dc05bbd2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x1d lib/dump_stack.c:113
 f2fs_is_valid_blkaddr+0xd9c/0x1450 fs/f2fs/checkpoint.c:218
 f2fs_truncate_data_blocks_range+0x64e/0xec0 fs/f2fs/file.c:592
 f2fs_truncate_data_blocks+0xf7/0x140 fs/f2fs/file.c:632
 truncate_dnode fs/f2fs/node.c:944 [inline]
 f2fs_truncate_inode_blocks+0x969/0x1210 fs/f2fs/node.c:1154
 f2fs_do_truncate_blocks+0x74b/0xe00 fs/f2fs/file.c:721
 f2fs_truncate_blocks+0x111/0x310 fs/f2fs/file.c:749
 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:799
 f2fs_setattr+0xced/0x1370 fs/f2fs/file.c:1006
 notify_change+0xe22/0x10e0 fs/attr.c:482
 do_truncate+0x21c/0x300 fs/open.c:66
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x2726/0x2d60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13f/0x850 fs/open.c:1333
 do_sys_open fs/open.c:1349 [inline]
 __do_sys_creat fs/open.c:1425 [inline]
 __se_sys_creat fs/open.c:1419 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1419
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f29d96218e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9ca132d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0000555555a822c0 RCX: 00007f29d96218e9
RDX: 00007f29d95df503 RSI: 00000000000001f8 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 0000000000010608 R09: 0000000000000000
R10: 00007ffe9ca13360 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe9ca13360 R14: 0000000000000003 R15: 00007ffe9ca13320
 </TASK>
F2FS-fs (loop0): dec_valid_node_count: inconsistent i_blocks, ino:8, iblocks:0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/12 15:48 android14-6.1 af58dc05bbd2 ecca8a24 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-6-1 KASAN: use-after-free Read in f2fs_truncate_data_blocks_range
2023/05/23 01:52 android14-6.1 e6c15792a6de 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in f2fs_truncate_data_blocks_range
* Struck through repros no longer work on HEAD.