kernel BUG in scsi_target_reap

Status: premoderation: reported syz repro on 2026/10/07 07:02
Reported-by: syzbot+483348dc8decfdd485b0@syzkaller.appspotmail.com
First crash: 2d21h, last: 1h39m

Sample crash report:
scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured
------------[ cut here ]------------
kernel BUG at drivers/scsi/scsi_scan.c:595!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 405 Comm: syz.6.18 Tainted: G        W          syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
RIP: 0010:scsi_target_reap+0x169/0x170 drivers/scsi/scsi_scan.c:595
Code: bc fe e9 f4 fe ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 4b ff ff ff 4c 89 ef e8 c1 b6 bc fe e9 3e ff ff ff e8 17 2a 77 fe <0f> 0b 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 b8 f5 24 0c
RSP: 0018:ffffc90000aa7808 EFLAGS: 00010293
RAX: ffffffff82fa4429 RBX: ffff888114779800 RCX: ffff88811b89a880
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005
RBP: ffffc90000aa7830 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000154ee8 R12: ffff888114779800
R13: ffff888114779bc4 R14: 1ffff110228ef378 R15: 0000000000000005
FS:  0000555564323500(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055558a3dc888 CR3: 0000000110832000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __scsi_scan_target+0x5c0/0xc20 drivers/scsi/scsi_scan.c:1738
 scsi_scan_channel drivers/scsi/scsi_scan.c:1809 [inline]
 scsi_scan_host_selected+0x34e/0x600 drivers/scsi/scsi_scan.c:1838
 scsi_scan drivers/scsi/scsi_sysfs.c:151 [inline]
 store_scan+0x4aa/0x540 drivers/scsi/scsi_sysfs.c:191
 dev_attr_store+0x6c/0x90 drivers/base/core.c:2389
 sysfs_kf_write+0x137/0x150 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x307/0x470 fs/kernfs/file.c:352
 call_write_iter include/linux/fs.h:2282 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x5ef/0xd00 fs/read_write.c:584
 ksys_write+0x14a/0x260 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:646
 x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f7d5719e1d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe76107e68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f7d57425fa0 RCX: 00007f7d5719e1d9
RDX: 0000000000000005 RSI: 0000200000001400 RDI: 0000000000000003
RBP: 00007f7d57235888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7d57425fac R14: 00007f7d57425fa0 R15: 00007f7d57425fa0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:scsi_target_reap+0x169/0x170 drivers/scsi/scsi_scan.c:595
Code: bc fe e9 f4 fe ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 4b ff ff ff 4c 89 ef e8 c1 b6 bc fe e9 3e ff ff ff e8 17 2a 77 fe <0f> 0b 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 b8 f5 24 0c
RSP: 0018:ffffc90000aa7808 EFLAGS: 00010293
RAX: ffffffff82fa4429 RBX: ffff888114779800 RCX: ffff88811b89a880
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005
RBP: ffffc90000aa7830 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000154ee8 R12: ffff888114779800
R13: ffff888114779bc4 R14: 1ffff110228ef378 R15: 0000000000000005
FS:  0000555564323500(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055558a3dc888 CR3: 0000000110832000 CR4: 00000000003506a0
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
2026/10/10 02:45 android14-6.1 9ea8d8374e5e 4f92358f .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-1 kernel BUG in scsi_target_reap
2026/10/10 02:45 android14-6.1 9ea8d8374e5e 4f92358f .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-1 kernel BUG in scsi_target_reap
2026/10/10 01:29 android14-6.1 9ea8d8374e5e 4f92358f .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-1 kernel BUG in scsi_target_reap
2026/10/07 07:01 android14-6.1 3b0884642a50 f7710056 .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-1 kernel BUG in scsi_target_reap
2026/10/10 02:06 android14-6.1 9ea8d8374e5e 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 kernel BUG in scsi_target_reap
* Struck through repros no longer work on HEAD.