[Android 6.1] kernel BUG in scsi_target_reap

2 views
Skip to first unread message

syzbot

unread,
Oct 30, 2026, 12:29:53 PM (10 days ago) Oct 30
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 17f0538436d1 FROMGIT: usb: gadget: f_midi: fix UAF race du..
git tree: android14-6.1
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1745757f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=3533141b441d6292
dashboard link: https://syzkaller.appspot.com/bug?extid=0ba762fae6f2eceb787f
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11ec7b95580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=149ddd29580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/41e92de1e5a2/disk-17f05384.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/66180d476586/vmlinux-17f05384.xz
kernel image: https://storage.googleapis.com/syzbot-assets/47e74e19286d/bzImage-17f05384.xz

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

RBP: 00007f2c37f32b40 R08: 33203a6b63617473 R09: 33203a6b63617473
R10: 33203a6b63617473 R11: 0000000000000246 R12: 00007f2c37f02e58
R13: 00002000000000c0 R14: 0000200000000100 R15: 000020000000011c
</TASK>
---[ end trace 0000000000000000 ]---
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: 335 Comm: syz-executor402 Tainted: G W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/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 f1 79 bc fe e9 3e ff ff ff e8 d7 dd 76 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:ffffc90001027808 EFLAGS: 00010293
RAX: ffffffff82fa9449 RBX: ffff88811ae04800 RCX: ffff88810f85e540
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005
RBP: ffffc90001027830 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000204ee8 R12: ffff88811ae04800
R13: ffff88811ae04bc4 R14: 1ffff110235c0978 R15: 0000000000000005
FS: 00007f2c37e5c6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2c37e3abb0 CR3: 000000012197a000 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:0x7f2c37e87b69
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2c37e5c218 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f2c37f32b48 RCX: 00007f2c37e87b69
RDX: 0000000000000005 RSI: 0000200000000100 RDI: 0000000000000003
RBP: 00007f2c37f32b40 R08: 33203a6b63617473 R09: 33203a6b63617473
R10: 33203a6b63617473 R11: 0000000000000246 R12: 00007f2c37f02e58
R13: 00002000000000c0 R14: 0000200000000100 R15: 000020000000011c
</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 f1 79 bc fe e9 3e ff ff ff e8 d7 dd 76 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:ffffc90001027808 EFLAGS: 00010293
RAX: ffffffff82fa9449 RBX: ffff88811ae04800 RCX: ffff88810f85e540
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005
RBP: ffffc90001027830 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000204ee8 R12: ffff88811ae04800
R13: ffff88811ae04bc4 R14: 1ffff110235c0978 R15: 0000000000000005
FS: 00007f2c37e5c6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2c37e3abb0 CR3: 000000012197a000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

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.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages