syzbot


kernel BUG in dev_args_match_device

Status: upstream: reported on 2022/11/02 18:06
Reported-by: syzbot+031687116258450f9853@syzkaller.appspotmail.com
Fix commit: 0fca385d6ebc btrfs: fix match incorrectly in dev_args_match_device
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 88d, last: 88d

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/btrfs/ctree.h:3710!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 2686 Comm: syz-executor.5 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
RIP: 0010:assertfail+0x1a/0x1c fs/btrfs/ctree.h:3710
Code: 00 00 e8 7e 9c 55 f7 eb e3 e8 77 9c 55 f7 eb dc 89 f1 48 89 fe 48 c7 c7 60 c8 db 8a 48 c7 c2 40 ed db 8a 31 c0 e8 27 86 ff ff <0f> 0b e8 54 9c 55 f7 48 c7 c7 60 f9 82 91 e9 e8 f9 e7 f9 89 f1 48
RSP: 0018:ffffc90003a4fd80 EFLAGS: 00010246
RAX: 0000000000000057 RBX: 0000000000000000 RCX: 88ff9485f0ebf200
RDX: ffffc90004609000 RSI: 0000000000003f0f RDI: 0000000000003f10
RBP: ffffc90003a4fe70 R08: ffffffff816b8dfd R09: fffff52000749f69
R10: fffff52000749f69 R11: 1ffff92000749f68 R12: ffffc90003a4fe60
R13: dffffc0000000000 R14: ffff88807f3e4000 R15: ffffc90003a4fe60
FS:  00007f0048a6c700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555e09b0b000 CR3: 000000003ba9d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 dev_args_match_device+0x1e6/0x220 fs/btrfs/volumes.c:6921
 btrfs_find_device+0xbb/0x250 fs/btrfs/volumes.c:6950
 btrfs_ioctl_dev_info+0x3f0/0xb20 fs/btrfs/ioctl.c:3740
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856
 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:0x7f0047c8b5a9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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:00007f0048a6c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f0047dac050 RCX: 00007f0047c8b5a9
RDX: 0000000020000980 RSI: 00000000d000941e RDI: 0000000000000003
RBP: 00007f0047ce67b0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc080c58df R14: 00007f0048a6c300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:assertfail+0x1a/0x1c fs/btrfs/ctree.h:3710
Code: 00 00 e8 7e 9c 55 f7 eb e3 e8 77 9c 55 f7 eb dc 89 f1 48 89 fe 48 c7 c7 60 c8 db 8a 48 c7 c2 40 ed db 8a 31 c0 e8 27 86 ff ff <0f> 0b e8 54 9c 55 f7 48 c7 c7 60 f9 82 91 e9 e8 f9 e7 f9 89 f1 48
RSP: 0018:ffffc90003a4fd80 EFLAGS: 00010246
RAX: 0000000000000057 RBX: 0000000000000000 RCX: 88ff9485f0ebf200
RDX: ffffc90004609000 RSI: 0000000000003f0f RDI: 0000000000003f10
RBP: ffffc90003a4fe70 R08: ffffffff816b8dfd R09: fffff52000749f69
R10: fffff52000749f69 R11: 1ffff92000749f68 R12: ffffc90003a4fe60
R13: dffffc0000000000 R14: ffff88807f3e4000 R15: ffffc90003a4fe60
FS:  00007f0048a6c700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000980 CR3: 000000003ba9d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-fs 2022/11/02 17:21 upstream b229b6ca5abb 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in dev_args_match_device
* Struck through repros no longer work on HEAD.