syzbot


kernel BUG in submit_bh_wbc

Status: fixed on 2024/04/24 18:26
Subsystems: nilfs
[Documentation on labels]
Reported-by: syzbot+3a841e887ad90c07541a@syzkaller.appspotmail.com
Fix commit: 269cdf353b5b nilfs2: prevent kernel bug at submit_bh_wbc()
First crash: 20d, last: 6d09h
Cause bisection: introduced by (bisect log) :
commit 602ce7b8e1343b19c0cf93a3dd1926838ac5a1cc
Author: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Date: Fri Jan 27 13:22:02 2023 +0000

  nilfs2: prevent WARNING in nilfs_dat_commit_end()

Crash: kernel BUG in submit_bh_wbc (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [nilfs?] kernel BUG in submit_bh_wbc 1 (2) 2024/04/15 06:16
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 kernel BUG in submit_bh_wbc origin:lts-only C 18 2d05h 391d 0/3 upstream: reported C repro on 2023/04/04 23:04
upstream kernel BUG at fs/buffer.c:LINE! nilfs C done error 567 21d 2203d 26/26 fixed on 2024/04/10 03:59
upstream kernel BUG in submit_bh_wbc (2) udf C done 19 10h50m 5d10h 0/26 upstream: reported C repro on 2024/04/25 09:05
linux-4.14 kernel BUG at fs/buffer.c:LINE! C error 59 435d 1829d 0/1 upstream: reported C repro on 2019/04/27 19:47
linux-4.19 kernel BUG at fs/buffer.c:LINE! (2) udf ext4 C error 31 442d 1256d 0/1 upstream: reported C repro on 2020/11/21 07:48
android-54 kernel BUG at fs/buffer.c:LINE! ext4 C 251 4h04m 1561d 0/2 upstream: reported C repro on 2020/01/21 13:12
linux-5.15 kernel BUG in submit_bh_wbc origin:upstream C error 8 53d 331d 0/3 upstream: reported C repro on 2023/06/04 13:30
android-6-1 kernel BUG in submit_bh_wbc missing-backport origin:lts C done done 66 19h54m 320d 0/2 upstream: reported C repro on 2023/06/15 00:20

Sample crash report:
NILFS (loop0): discard dirty block: blocknr=18446744073709551615, size=1024
NILFS (loop0): nilfs_get_block (ino=18): a race condition while inserting a data block at offset=0
------------[ cut here ]------------
kernel BUG at fs/buffer.c:2768!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 PID: 5056 Comm: syz-executor429 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:submit_bh_wbc+0x543/0x560 fs/buffer.c:2768
Code: 07 7d ff be 00 10 00 00 48 c7 c7 80 f8 26 8e 4c 89 fa e8 f0 cd be 02 e9 98 fe ff ff e8 86 07 7d ff 90 0f 0b e8 7e 07 7d ff 90 <0f> 0b e8 76 07 7d ff 90 0f 0b e8 6e 07 7d ff 90 0f 0b e8 66 07 7d
RSP: 0018:ffffc9000399f838 EFLAGS: 00010293
RAX: ffffffff8217ecd2 RBX: 0000000000000000 RCX: ffff88807cfe3c00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff8217e833 R09: 1ffff1100f095cae
R10: dffffc0000000000 R11: ffffed100f095caf R12: 0000000000000000
R13: ffff8880784ae570 R14: 0000000000000000 R15: 1ffff1100f095cae
FS:  00005555917ee380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000066c7e0 CR3: 000000007f430000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 submit_bh fs/buffer.c:2809 [inline]
 __bh_read fs/buffer.c:3074 [inline]
 bh_read_nowait include/linux/buffer_head.h:417 [inline]
 __block_write_begin_int+0x12d0/0x1a70 fs/buffer.c:2134
 __block_write_begin fs/buffer.c:2154 [inline]
 block_write_begin+0x9b/0x1e0 fs/buffer.c:2213
 nilfs_write_begin+0xa0/0x110 fs/nilfs2/inode.c:262
 generic_perform_write+0x322/0x640 mm/filemap.c:3930
 __generic_file_write_iter+0x1b8/0x230 mm/filemap.c:4022
 generic_file_write_iter+0xaf/0x310 mm/filemap.c:4051
 call_write_iter include/linux/fs.h:2108 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0xa84/0xcb0 fs/read_write.c:590
 ksys_write+0x1a0/0x2c0 fs/read_write.c:643
 do_syscall_64+0xfb/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f3d6ccdd9f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 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:00007ffc74baec58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0073746e6576652e RCX: 00007f3d6ccdd9f9
RDX: 0000000000000020 RSI: 0000000020000140 RDI: 0000000000000005
RBP: 652e79726f6d656d R08: 00000000000b15f8 R09: 00000000000b15f8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc74baee28 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:submit_bh_wbc+0x543/0x560 fs/buffer.c:2768
Code: 07 7d ff be 00 10 00 00 48 c7 c7 80 f8 26 8e 4c 89 fa e8 f0 cd be 02 e9 98 fe ff ff e8 86 07 7d ff 90 0f 0b e8 7e 07 7d ff 90 <0f> 0b e8 76 07 7d ff 90 0f 0b e8 6e 07 7d ff 90 0f 0b e8 66 07 7d
RSP: 0018:ffffc9000399f838 EFLAGS: 00010293
RAX: ffffffff8217ecd2 RBX: 0000000000000000 RCX: ffff88807cfe3c00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff8217e833 R09: 1ffff1100f095cae
R10: dffffc0000000000 R11: ffffed100f095caf R12: 0000000000000000
R13: ffff8880784ae570 R14: 0000000000000000 R15: 1ffff1100f095cae
FS:  00005555917ee380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000066c7e0 CR3: 000000007f430000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/10 16:19 upstream fe46a7dd189e 4320ec32 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in submit_bh_wbc
2024/04/24 10:05 upstream 9d1ddab261f3 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in submit_bh_wbc
2024/04/24 06:28 upstream 9d1ddab261f3 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in submit_bh_wbc
2024/04/23 05:35 upstream a2c63a3f3d68 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in submit_bh_wbc
2024/04/23 02:03 upstream a2c63a3f3d68 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in submit_bh_wbc
2024/04/22 05:22 upstream 3b68086599f8 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in submit_bh_wbc
2024/04/10 15:52 upstream fe46a7dd189e 4320ec32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in submit_bh_wbc
2024/04/22 04:40 upstream 48cf398f15fc af24b050 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in submit_bh_wbc
2024/04/22 09:55 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in submit_bh_wbc
2024/04/23 00:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in submit_bh_wbc
* Struck through repros no longer work on HEAD.