syzbot


kernel BUG in dec_valid_block_count

Status: upstream: reported C repro on 2025/04/07 12:10
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+8b376a77b2f364097fbe@syzkaller.appspotmail.com
First crash: 4d22h, last: 17h18m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [f2fs?] kernel BUG in dec_valid_block_count 1 (2) 2025/04/08 09:53
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/04/08 09:53 18m chao@kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git bugfix/syzbot report log

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/f2fs/f2fs.h:2521!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5312 Comm: syz-executor407 Not tainted 6.14.0-syzkaller-12886-ga1b5bd45d4ee #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:dec_valid_block_count+0x3b2/0x3c0 fs/f2fs/f2fs.h:2521
Code: 8a 01 fe e9 80 fd ff ff e8 db 64 97 fd 48 c7 c7 60 6e 31 8f 4c 89 e6 48 89 da e8 39 aa 14 01 e9 73 fe ff ff e8 bf 64 97 fd 90 <0f> 0b 66 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000d39f078 EFLAGS: 00010293
RAX: ffffffff842bf2c1 RBX: 00000000fffffcda RCX: ffff88801f41a440
RDX: 0000000000000000 RSI: 00000000000003fa RDI: 00000000000000d4
RBP: 1ffff110082999f4 R08: ffffffff842bef72 R09: fffff52001a73e00
R10: dffffc0000000000 R11: fffff52001a73e00 R12: ffff8880414ccfa4
R13: dffffc0000000000 R14: ffff8880414cc000 R15: 00000000000003fa
FS:  00007f5c4fc216c0(0000) GS:ffff88808c599000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5c4fc00d58 CR3: 0000000043b00000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 f2fs_truncate_data_blocks_range+0xc8c/0x11a0 fs/f2fs/file.c:695
 truncate_dnode+0x417/0x740 fs/f2fs/node.c:973
 truncate_nodes+0x3ec/0xf50 fs/f2fs/node.c:1014
 f2fs_truncate_inode_blocks+0x8e3/0x1370 fs/f2fs/node.c:1197
 f2fs_do_truncate_blocks+0x840/0x12b0 fs/f2fs/file.c:810
 f2fs_truncate_blocks+0x10d/0x300 fs/f2fs/file.c:838
 f2fs_truncate+0x417/0x720 fs/f2fs/file.c:888
 f2fs_setattr+0xc4f/0x12f0 fs/f2fs/file.c:1112
 notify_change+0xbca/0xe90 fs/attr.c:552
 do_truncate+0x222/0x310 fs/open.c:65
 handle_truncate fs/namei.c:3466 [inline]
 do_open fs/namei.c:3849 [inline]
 path_openat+0x2e4f/0x35d0 fs/namei.c:4004
 do_filp_open+0x284/0x4e0 fs/namei.c:4031
 do_sys_openat2+0x12b/0x1d0 fs/open.c:1429
 do_sys_open fs/open.c:1444 [inline]
 __do_sys_creat fs/open.c:1522 [inline]
 __se_sys_creat fs/open.c:1516 [inline]
 __x64_sys_creat+0x124/0x170 fs/open.c:1516
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5c4fc6c839
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5c4fc21218 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007f5c4fcf8608 RCX: 00007f5c4fc6c839
RDX: 00007f5c4fc6c839 RSI: 0000000000000009 RDI: 0000200000000080
RBP: 00007f5c4fcf8600 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5c4fcc58f4
R13: 0000200000000100 R14: 0031656c69662f2e R15: 0000200000000080
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:dec_valid_block_count+0x3b2/0x3c0 fs/f2fs/f2fs.h:2521
Code: 8a 01 fe e9 80 fd ff ff e8 db 64 97 fd 48 c7 c7 60 6e 31 8f 4c 89 e6 48 89 da e8 39 aa 14 01 e9 73 fe ff ff e8 bf 64 97 fd 90 <0f> 0b 66 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000d39f078 EFLAGS: 00010293
RAX: ffffffff842bf2c1 RBX: 00000000fffffcda RCX: ffff88801f41a440
RDX: 0000000000000000 RSI: 00000000000003fa RDI: 00000000000000d4
RBP: 1ffff110082999f4 R08: ffffffff842bef72 R09: fffff52001a73e00
R10: dffffc0000000000 R11: fffff52001a73e00 R12: ffff8880414ccfa4
R13: dffffc0000000000 R14: ffff8880414cc000 R15: 00000000000003fa
FS:  00007f5c4fc216c0(0000) GS:ffff88808c599000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5c4fc00d58 CR3: 0000000043b00000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/03 13:48 upstream a1b5bd45d4ee 996a9618 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-snapshot-upstream-root kernel BUG in dec_valid_block_count
2025/04/03 12:55 upstream a1b5bd45d4ee 996a9618 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-snapshot-upstream-root kernel BUG in dec_valid_block_count
2025/04/03 14:46 upstream a1b5bd45d4ee 996a9618 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-snapshot-upstream-root kernel BUG in dec_valid_block_count
2025/04/07 17:12 upstream 0af2f6be1b42 2f0c9720 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in dec_valid_block_count
2025/04/03 12:05 upstream a1b5bd45d4ee 996a9618 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in dec_valid_block_count
* Struck through repros no longer work on HEAD.