[v6.1] kernel BUG in submit_bh_wbc

1 view
Skip to first unread message

syzbot

unread,
Apr 4, 2023, 7:04:53 PM4/4/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3b29299e5f60 Linux 6.1.22
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11b228aec80000
kernel config: https://syzkaller.appspot.com/x/.config?x=bbb9a1f6f7f5a1d9
dashboard link: https://syzkaller.appspot.com/bug?extid=91fae336a132194285b9
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2affbd06cbfd/disk-3b29299e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8b22d1baf827/vmlinux-3b29299e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d5e3891c88bf/Image-3b29299e.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+91fae3...@syzkaller.appspotmail.com

NILFS (loop1): nilfs_get_block (ino=18): a race condition while inserting a data block at offset=0
------------[ cut here ]------------
kernel BUG at fs/buffer.c:2666!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 14008 Comm: syz-executor.1 Not tainted 6.1.22-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : submit_bh_wbc+0x3f4/0x468 fs/buffer.c:2666
lr : submit_bh_wbc+0x3f4/0x468 fs/buffer.c:2666
sp : ffff800021096f70
x29: ffff800021096f80 x28: fffffc0003d52e40 x27: dfff800000000000
x26: fffffc0003d52e48 x25: 0000000000000000 x24: 1fffe00022a84457
x23: 0000000000000000 x22: 0000000000000001 x21: 0000000000000000
x20: ffff0001154222b8 x19: 0000000000000004 x18: 1fffe000368bab76
x17: ffff80001557d000 x16: ffff800008300ec0 x15: ffff0001b45d5bbc
x14: 1ffff00002ab00b0 x13: dfff800000000000 x12: 0000000000040000
x11: 0000000000008402 x10: ffff8000278d9000 x9 : ffff800008b28794
x8 : 0000000000008403 x7 : ffff80000827b520 x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000002 x3 : ffff800008b294b4
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
submit_bh_wbc+0x3f4/0x468 fs/buffer.c:2666
submit_bh fs/buffer.c:2707 [inline]
__bh_read fs/buffer.c:2972 [inline]
bh_read_nowait include/linux/buffer_head.h:427 [inline]
__block_write_begin_int+0x83c/0x13b4 fs/buffer.c:2021
__block_write_begin fs/buffer.c:2041 [inline]
block_write_begin+0x98/0x11c fs/buffer.c:2102
nilfs_write_begin+0xa8/0x114 fs/nilfs2/inode.c:261
generic_perform_write+0x278/0x55c mm/filemap.c:3754
__generic_file_write_iter+0x250/0x388 mm/filemap.c:3850
generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:3914
do_iter_write+0x534/0x964 fs/read_write.c:861
vfs_iter_write+0x88/0xac fs/read_write.c:902
iter_file_splice_write+0x618/0xc48 fs/splice.c:686
do_splice_from fs/splice.c:764 [inline]
direct_splice_actor+0xe4/0x1c0 fs/splice.c:931
splice_direct_to_actor+0x3c4/0x944 fs/splice.c:886
do_splice_direct+0x1f4/0x334 fs/splice.c:974
do_sendfile+0x4bc/0xc70 fs/read_write.c:1255
__do_sys_sendfile64 fs/read_write.c:1323 [inline]
__se_sys_sendfile64 fs/read_write.c:1309 [inline]
__arm64_sys_sendfile64+0x160/0x3b4 fs/read_write.c:1309
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: 17ffffad 97e73a52 d4210000 97e73a50 (d4210000)
---[ end trace 0000000000000000 ]---


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 11, 2023, 3:49:05 PM6/11/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 2f3918bc53fb Linux 6.1.33
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=114a7f95280000
kernel config: https://syzkaller.appspot.com/x/.config?x=668ab7dd51e152ad
dashboard link: https://syzkaller.appspot.com/bug?extid=91fae336a132194285b9
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=158b5795280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1776193b280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/148750653b59/disk-2f3918bc.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f86efd682b25/vmlinux-2f3918bc.xz
kernel image: https://storage.googleapis.com/syzbot-assets/483386a4e270/bzImage-2f3918bc.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/e4f8b01f137e/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+91fae3...@syzkaller.appspotmail.com

NILFS (loop0): nilfs_get_block (ino=19): a race condition while inserting a data block at offset=0
------------[ cut here ]------------
kernel BUG at fs/buffer.c:2666!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3686 Comm: syz-executor196 Not tainted 6.1.33-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:submit_bh_wbc+0x4c0/0x4e0 fs/buffer.c:2666
Code: 02 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c be fe ff ff 48 89 ef e8 e1 ab e0 ff e9 b1 fe ff ff e8 67 64 8a ff 0f 0b e8 60 64 8a ff <0f> 0b e8 59 64 8a ff 0f 0b e8 52 64 8a ff 0f 0b e8 4b 64 8a ff 0f
RSP: 0018:ffffc90003c3f860 EFLAGS: 00010293
RAX: ffffffff81ff70f0 RBX: 0000000000000000 RCX: ffff88807e458000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003c3fa48 R08: ffffffff81ff6ccd R09: ffffed100e1d92af
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100e1d92ae
R13: ffff888070ec9570 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f3c9cf96700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3c9cf96718 CR3: 00000000236ff000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
submit_bh fs/buffer.c:2707 [inline]
__bh_read fs/buffer.c:2972 [inline]
bh_read_nowait include/linux/buffer_head.h:427 [inline]
__block_write_begin_int+0x12b2/0x1a30 fs/buffer.c:2021
__block_write_begin fs/buffer.c:2041 [inline]
block_write_begin+0x98/0x1f0 fs/buffer.c:2102
nilfs_write_begin+0x9c/0x110 fs/nilfs2/inode.c:261
generic_perform_write+0x2fc/0x5e0 mm/filemap.c:3754
__generic_file_write_iter+0x297/0x400 mm/filemap.c:3850
generic_file_write_iter+0xab/0x310 mm/filemap.c:3914
call_write_iter include/linux/fs.h:2205 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x7ae/0xba0 fs/read_write.c:584
ksys_write+0x19c/0x2c0 fs/read_write.c:637
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:0x7f3ca530b6e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3c9cf962f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3ca53917b0 RCX: 00007f3ca530b6e9
RDX: 00000000000000a0 RSI: 0000000020000380 RDI: 0000000000000006
RBP: 00007f3ca535dd1c R08: 00000000ffffff7f R09: 0000000000000000
R10: 000000000000001b R11: 0000000000000246 R12: 00007f3ca535db18
R13: 3f00000000000000 R14: 0400000000000000 R15: 00007f3ca53917b8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:submit_bh_wbc+0x4c0/0x4e0 fs/buffer.c:2666
Code: 02 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c be fe ff ff 48 89 ef e8 e1 ab e0 ff e9 b1 fe ff ff e8 67 64 8a ff 0f 0b e8 60 64 8a ff <0f> 0b e8 59 64 8a ff 0f 0b e8 52 64 8a ff 0f 0b e8 4b 64 8a ff 0f
RSP: 0018:ffffc90003c3f860 EFLAGS: 00010293
RAX: ffffffff81ff70f0 RBX: 0000000000000000 RCX: ffff88807e458000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003c3fa48 R08: ffffffff81ff6ccd R09: ffffed100e1d92af
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100e1d92ae
R13: ffff888070ec9570 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f3c9cf96700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3ca534cdc0 CR3: 00000000236ff000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages