syzbot


kernel BUG in f2fs_invalidate_blocks (2)

Status: upstream: reported C repro on 2025/05/26 08:29
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+240643026e8cd9ddfaf2@syzkaller.appspotmail.com
First crash: 8d01h, last: 8d00h
Cause bisection: introduced by (bisect log) [merge commit]:
commit d608703fcdd9e9538f6c7a0fcf98bf79b1375b60
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu May 22 00:24:18 2025 +0000

  Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Crash: kernel BUG in f2fs_invalidate_blocks (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [f2fs?] kernel BUG in f2fs_invalidate_blocks (2) 0 (1) 2025/05/26 08:29
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in f2fs_invalidate_blocks f2fs 4 26d 255d 28/28 fixed on 2025/05/06 15:33

Sample crash report:
syz-executor274: attempt to access beyond end of device
loop0: rw=2049, sector=45096, nr_sectors = 64 limit=40427
F2FS-fs (loop0): inject inconsistent footer in sanity_check_node_footer of f2fs_get_inode_folio fs/f2fs/node.c:1547 [inline]
F2FS-fs (loop0): inject inconsistent footer in sanity_check_node_footer of f2fs_get_inode_page fs/f2fs/node.c:1552 [inline]
F2FS-fs (loop0): inject inconsistent footer in sanity_check_node_footer of f2fs_get_dnode_of_data+0x251/0x1c30 fs/f2fs/node.c:781
F2FS-fs (loop0): inconsistent node block, node_type:1, nid:10, node_footer[nid:10,ino:10,ofs:0,cpver:10241045589465957861,blkaddr:4615]
------------[ cut here ]------------
kernel BUG at fs/f2fs/segment.c:2586!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 1 UID: 0 PID: 5825 Comm: syz-executor274 Not tainted 6.15.0-rc7-syzkaller-00014-gd608703fcdd9 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:f2fs_invalidate_blocks+0xa02/0xa10 fs/f2fs/segment.c:2586
Code: 89 d1 80 e1 07 80 c1 03 38 c1 0f 8c eb fa ff ff 48 8b 7c 24 08 e8 be c9 1a fe 48 8b 54 24 08 e9 d7 fa ff ff e8 5f f4 ba 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:ffffc9000419f5d8 EFLAGS: 00010293
RAX: ffffffff8404fc81 RBX: ffff8880340fcc00 RCX: ffff8880332a8000
RDX: 0000000000000000 RSI: ffffffff8e53f220 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffff8880332a8000 R09: 0000000000000003
R10: 00000000ffffffff R11: 0000000000000000 R12: dffffc0000000000
R13: ffff88806e92c000 R14: 00000000ffffffff R15: 0000000000000000
FS:  00005555846a3380(0000) GS:ffff8881261f6000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000006000 CR3: 000000006ed52000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __replace_atomic_write_block+0x498/0x1240 fs/f2fs/segment.c:254
 __complete_revoke_list fs/f2fs/segment.c:293 [inline]
 __f2fs_commit_atomic_write fs/f2fs/segment.c:385 [inline]
 f2fs_commit_atomic_write+0xefc/0x11b0 fs/f2fs/segment.c:403
 f2fs_ioc_commit_atomic_write fs/f2fs/file.c:2318 [inline]
 __f2fs_ioctl+0x3f11/0xae80 fs/f2fs/file.c:4551
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:892
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7566ed5b59
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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:00007ffef05ec848 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7566ed5b59
RDX: 0000000000000000 RSI: 000000000000f502 RDI: 0000000000000004
RBP: 00007f7566f4e5f0 R08: 00005555846a44c0 R09: 00005555846a44c0
R10: 00005555846a44c0 R11: 0000000000000246 R12: 00007ffef05ec870
R13: 00007ffef05eca98 R14: 431bde82d7b634db R15: 00007f7566f1e03b
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:f2fs_invalidate_blocks+0xa02/0xa10 fs/f2fs/segment.c:2586
Code: 89 d1 80 e1 07 80 c1 03 38 c1 0f 8c eb fa ff ff 48 8b 7c 24 08 e8 be c9 1a fe 48 8b 54 24 08 e9 d7 fa ff ff e8 5f f4 ba 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:ffffc9000419f5d8 EFLAGS: 00010293
RAX: ffffffff8404fc81 RBX: ffff8880340fcc00 RCX: ffff8880332a8000
RDX: 0000000000000000 RSI: ffffffff8e53f220 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffff8880332a8000 R09: 0000000000000003
R10: 00000000ffffffff R11: 0000000000000000 R12: dffffc0000000000
R13: ffff88806e92c000 R14: 00000000ffffffff R15: 0000000000000000
FS:  00005555846a3380(0000) GS:ffff8881260f6000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f684d7f8000 CR3: 000000006ed52000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/22 09:43 upstream d608703fcdd9 0919b50b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs kernel BUG in f2fs_invalidate_blocks
2025/05/22 08:57 upstream d608703fcdd9 0919b50b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs kernel BUG in f2fs_invalidate_blocks
2025/05/22 08:19 upstream d608703fcdd9 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in f2fs_invalidate_blocks
* Struck through repros no longer work on HEAD.