RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
==================================================================
BUG: KASAN: use-after-free in f2fs_truncate_data_blocks_range+0x7f0/0xec0 fs/f2fs/file.c:574
Read of size 4 at addr ffff888159c8e000 by task syz-executor.3/18583
CPU: 0 PID: 18583 Comm: syz-executor.3 Not tainted 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
The buggy address belongs to the physical page:
page:ffffea0005672380 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x159c8e
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea0004719488 ffffea0004a2eb88 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 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 16262, tgid 16262 (syz-executor.0), ts 1971027471912, free_ts 1988083495305
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x213/0x220 mm/page_alloc.c:2569
prep_new_page mm/page_alloc.c:2576 [inline]
get_page_from_freelist+0x2411/0x24f0 mm/page_alloc.c:4368
__alloc_pages+0x3a1/0x780 mm/page_alloc.c:5633
allocate_slab mm/slub.c:1959 [inline]
new_slab+0xce/0x4c0 mm/slub.c:2012
___slab_alloc+0x6f9/0xb80 mm/slub.c:3200
kmem_cache_alloc_bulk+0x17d/0x3d0 mm/slub.c:3850
mt_alloc_bulk lib/maple_tree.c:157 [inline]
mas_alloc_nodes+0x3ce/0x7d0 lib/maple_tree.c:1299
mas_node_count_gfp lib/maple_tree.c:1359 [inline]
mas_preallocate+0x12c/0x360 lib/maple_tree.c:5806
__vma_adjust+0x616/0x1870 mm/mmap.c:717
__split_vma+0x31f/0x480
split_vma+0x7c/0xd0 mm/mmap.c:2276
mprotect_fixup+0x4b5/0x7a0 mm/mprotect.c:617
do_mprotect_pkey+0x8b3/0xbd0 mm/mprotect.c:792
__do_sys_mprotect mm/mprotect.c:819 [inline]
__se_sys_mprotect mm/mprotect.c:816 [inline]
__x64_sys_mprotect+0x80/0x90 mm/mprotect.c:816
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:1481 [inline]
free_pcp_prepare mm/page_alloc.c:1555 [inline]
free_unref_page_prepare+0x83d/0x850 mm/page_alloc.c:3468
free_unref_page+0x8d/0x480 mm/page_alloc.c:3564
free_the_page mm/page_alloc.c:788 [inline]
__free_pages+0x61/0xf0 mm/page_alloc.c:5722
__free_slab+0xce/0x1a0 mm/slub.c:2036
free_slab mm/slub.c:2051 [inline]
discard_slab+0x29/0x40 mm/slub.c:2057
__slab_free+0x205/0x280 mm/slub.c:3594
do_slab_free mm/slub.c:3635 [inline]
___cache_free+0xc6/0xd0 mm/slub.c:3688
qlink_free+0x4d/0x90 mm/kasan/quarantine.c:168
qlist_free_all+0x52/0xc0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x15a/0x180 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:310
kasan_slab_alloc include/linux/kasan.h:202 [inline]
slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:768
slab_alloc_node mm/slub.c:3418 [inline]
slab_alloc mm/slub.c:3426 [inline]
__kmem_cache_alloc_lru mm/slub.c:3433 [inline]
kmem_cache_alloc+0x175/0x2c0 mm/slub.c:3442
getname_flags+0xba/0x520 fs/namei.c:139
getname+0x19/0x20 fs/namei.c:218
do_sys_openat2+0xd7/0x850 fs/open.c:1327
Memory state around the buggy address:
ffff888159c8df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888159c8df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888159c8e000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888159c8e080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888159c8e100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
F2FS-fs (loop3): access invalid blkaddr:883380224
CPU: 0 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): access invalid blkaddr:4294936705
CPU: 1 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): Inconsistent error blkaddr:16264, sit bitmap:0
CPU: 1 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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
__is_bitmap_valid fs/f2fs/checkpoint.c:171 [inline]
f2fs_is_valid_blkaddr+0xcd8/0x1450 fs/f2fs/checkpoint.c:221
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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): access invalid blkaddr:131662050
CPU: 1 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): access invalid blkaddr:1548949756
CPU: 1 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): access invalid blkaddr:2537014052
CPU: 1 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): Inconsistent error blkaddr:16264, sit bitmap:0
CPU: 1 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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
__is_bitmap_valid fs/f2fs/checkpoint.c:171 [inline]
f2fs_is_valid_blkaddr+0xcd8/0x1450 fs/f2fs/checkpoint.c:221
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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): access invalid blkaddr:129827042
CPU: 0 PID: 18583 Comm: syz-executor.3 Tainted: G B 6.1.25-syzkaller-00259-ge6c15792a6de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__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_openat fs/open.c:1365 [inline]
__se_sys_openat fs/open.c:1360 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1360
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:0x7fe48288c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4836a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe4829abf80 RCX: 00007fe48288c169
RDX: 00000000001a1a83 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007fe4828e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb78c82ef R14: 00007fe4836a5300 R15: 0000000000022000
F2FS-fs (loop3): dec_valid_node_count: inconsistent i_blocks, ino:8, iblocks:0