WARNING: kobject bug in __scsi_remove_device

Status: premoderation: reported syz repro on 2026/08/21 16:20
Reported-by: syzbot+b72d72498109e7c40dd4@syzkaller.appspotmail.com
First crash: 11d, last: 2d03h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 WARNING: kobject bug in __scsi_remove_device origin:upstream -1 syz 3 5d14h 15d 0/3 upstream: reported syz repro on 2026/08/17 20:44
linux-6.6 WARNING: kobject bug in __scsi_remove_device -1 syz 5 5d09h 14d 0/2 upstream: reported syz repro on 2026/08/19 13:20

Sample crash report:
------------[ cut here ]------------
kobject: '(null)' (ffff88811548c548): is not initialized, yet kobject_put() is being called.
WARNING: CPU: 0 PID: 437 at lib/kobject.c:736 kobject_put+0x8e/0x2a0 lib/kobject.c:734
Modules linked in:
CPU: 0 UID: 0 PID: 437 Comm: syz.7.23 Not tainted syzkaller #0 4c7c6fabea823c7a50d4a31162f440126d0e7a76
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:kobject_put+0x8e/0x2a0 lib/kobject.c:734
Code: 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 48 89 df e8 f4 94 44 fc 48 8b 33 48 c7 c7 20 0d 9b 86 48 89 da e8 22 8d 68 fb <0f> 0b eb 0f e8 69 ba eb fb e9 9c 01 00 00 e8 5f ba eb fb 4c 8d 7b
RSP: 0018:ffffc90000ecf1f8 EFLAGS: 00010246
RAX: e5527267748cae00 RBX: ffff88811548c548 RCX: ffff8881207e5f00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: ffffc90000ecf220 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e9f334 R12: 00000000fffffff4
R13: ffff88811548c584 R14: 1ffff11022a918b0 R15: 0000000000000000
FS:  000055558bfbf500(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffef29c3f00 CR3: 000000010b39e000 CR4: 00000000003526b0
Call Trace:
 <TASK>
 put_device+0x23/0x40 drivers/base/core.c:3800
 __scsi_remove_device+0xc4/0x3c0 drivers/scsi/scsi_sysfs.c:1501
 scsi_alloc_sdev+0x970/0xcc0 drivers/scsi/scsi_scan.c:379
 scsi_probe_and_add_lun+0x1e9/0x3e60 drivers/scsi/scsi_scan.c:1207
 __scsi_scan_target+0x1f1/0xc20 drivers/scsi/scsi_scan.c:1754
 scsi_scan_channel drivers/scsi/scsi_scan.c:1842 [inline]
 scsi_scan_host_selected+0x352/0x610 drivers/scsi/scsi_scan.c:1871
 scsi_scan drivers/scsi/scsi_sysfs.c:151 [inline]
 store_scan+0x4ba/0x550 drivers/scsi/scsi_sysfs.c:191
 dev_attr_store+0x73/0xa0 drivers/base/core.c:2440
 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x75f/0xfd0 fs/read_write.c:684
 ksys_write+0x145/0x260 fs/read_write.c:737
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x7f/0x90 fs/read_write.c:746
 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f5ac319e159
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:00007fffefea3738 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f5ac3425fa0 RCX: 00007f5ac319e159
RDX: 0000000000000005 RSI: 0000200000001400 RDI: 0000000000000003
RBP: 00007f5ac3235024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5ac3425fac R14: 00007f5ac3425fa0 R15: 00007f5ac3425fa0
 </TASK>
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 437 at lib/refcount.c:28 refcount_warn_saturate+0x119/0x1c0 lib/refcount.c:28
Modules linked in:
CPU: 0 UID: 0 PID: 437 Comm: syz.7.23 Tainted: G        W          syzkaller #0 4c7c6fabea823c7a50d4a31162f440126d0e7a76
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:refcount_warn_saturate+0x119/0x1c0 lib/refcount.c:28
Code: 05 01 48 c7 c7 e0 f3 51 86 e8 63 21 55 fe 0f 0b eb da e8 aa 4e d8 fe c6 05 29 30 36 05 01 48 c7 c7 40 f4 51 86 e8 47 21 55 fe <0f> 0b eb be e8 8e 4e d8 fe c6 05 0a 30 36 05 01 48 c7 c7 80 f3 51
RSP: 0018:ffffc90000ecf1d8 EFLAGS: 00010246
RAX: e5527267748cae00 RBX: 0000000000000003 RCX: ffff8881207e5f00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: ffffc90000ecf1e8 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e9f334 R12: 0000000000000000
R13: ffff88811548c584 R14: ffff88811548c580 R15: ffff88811548c580
FS:  000055558bfbf500(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffef29c3f00 CR3: 000000010b39e000 CR4: 00000000003526b0
Call Trace:
 <TASK>
 __refcount_sub_and_test include/linux/refcount.h:400 [inline]
 __refcount_dec_and_test include/linux/refcount.h:432 [inline]
 refcount_dec_and_test include/linux/refcount.h:450 [inline]
 kref_put include/linux/kref.h:64 [inline]
 kobject_put+0x25a/0x2a0 lib/kobject.c:737
 put_device+0x23/0x40 drivers/base/core.c:3800
 __scsi_remove_device+0xc4/0x3c0 drivers/scsi/scsi_sysfs.c:1501
 scsi_alloc_sdev+0x970/0xcc0 drivers/scsi/scsi_scan.c:379
 scsi_probe_and_add_lun+0x1e9/0x3e60 drivers/scsi/scsi_scan.c:1207
 __scsi_scan_target+0x1f1/0xc20 drivers/scsi/scsi_scan.c:1754
 scsi_scan_channel drivers/scsi/scsi_scan.c:1842 [inline]
 scsi_scan_host_selected+0x352/0x610 drivers/scsi/scsi_scan.c:1871
 scsi_scan drivers/scsi/scsi_sysfs.c:151 [inline]
 store_scan+0x4ba/0x550 drivers/scsi/scsi_sysfs.c:191
 dev_attr_store+0x73/0xa0 drivers/base/core.c:2440
 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x75f/0xfd0 fs/read_write.c:684
 ksys_write+0x145/0x260 fs/read_write.c:737
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x7f/0x90 fs/read_write.c:746
 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f5ac319e159
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:00007fffefea3738 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f5ac3425fa0 RCX: 00007f5ac319e159
RDX: 0000000000000005 RSI: 0000200000001400 RDI: 0000000000000003
RBP: 00007f5ac3235024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5ac3425fac R14: 00007f5ac3425fa0 R15: 00007f5ac3425fa0
 </TASK>
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
kobject: '(null)' (ffff88811548c1d0): is not initialized, yet kobject_put() is being called.
WARNING: CPU: 0 PID: 437 at lib/kobject.c:736 kobject_put+0x8e/0x2a0 lib/kobject.c:734
Modules linked in:
CPU: 0 UID: 0 PID: 437 Comm: syz.7.23 Tainted: G        W          syzkaller #0 4c7c6fabea823c7a50d4a31162f440126d0e7a76
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:kobject_put+0x8e/0x2a0 lib/kobject.c:734
Code: 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 48 89 df e8 f4 94 44 fc 48 8b 33 48 c7 c7 20 0d 9b 86 48 89 da e8 22 8d 68 fb <0f> 0b eb 0f e8 69 ba eb fb e9 9c 01 00 00 e8 5f ba eb fb 4c 8d 7b
RSP: 0018:ffffc90000ecf1f8 EFLAGS: 00010246
RAX: e5527267748cae00 RBX: ffff88811548c1d0 RCX: ffff8881207e5f00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: ffffc90000ecf220 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e9f334 R12: ffffffff866311d0
R13: ffff88811548c20c R14: 1ffff11022a91841 R15: 0000000000000000
FS:  000055558bfbf500(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffef29c3f00 CR3: 000000010b39e000 CR4: 00000000003526b0
Call Trace:
 <TASK>
 put_device+0x23/0x40 drivers/base/core.c:3800
 __scsi_remove_device+0x32d/0x3c0 drivers/scsi/scsi_sysfs.c:1527
 scsi_alloc_sdev+0x970/0xcc0 drivers/scsi/scsi_scan.c:379
 scsi_probe_and_add_lun+0x1e9/0x3e60 drivers/scsi/scsi_scan.c:1207
 __scsi_scan_target+0x1f1/0xc20 drivers/scsi/scsi_scan.c:1754
 scsi_scan_channel drivers/scsi/scsi_scan.c:1842 [inline]
 scsi_scan_host_selected+0x352/0x610 drivers/scsi/scsi_scan.c:1871
 scsi_scan drivers/scsi/scsi_sysfs.c:151 [inline]
 store_scan+0x4ba/0x550 drivers/scsi/scsi_sysfs.c:191
 dev_attr_store+0x73/0xa0 drivers/base/core.c:2440
 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x75f/0xfd0 fs/read_write.c:684
 ksys_write+0x145/0x260 fs/read_write.c:737
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x7f/0x90 fs/read_write.c:746
 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f5ac319e159
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:00007fffefea3738 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f5ac3425fa0 RCX: 00007f5ac319e159
RDX: 0000000000000005 RSI: 0000200000001400 RDI: 0000000000000003
RBP: 00007f5ac3235024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5ac3425fac R14: 00007f5ac3425fa0 R15: 00007f5ac3425fa0
 </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:594!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 437 Comm: syz.7.23 Tainted: G        W          syzkaller #0 4c7c6fabea823c7a50d4a31162f440126d0e7a76
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:scsi_target_reap+0x172/0x180 drivers/scsi/scsi_scan.c:594
Code: 81 fe e9 ef fe ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 46 ff ff ff 4c 89 ef e8 68 6e 81 fe e9 39 ff ff ff e8 1e 94 28 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 17 32 34 aa 90 90 90
RSP: 0018:ffffc90000ecf7a8 EFLAGS: 00010293
RAX: ffffffff835ee322 RBX: ffff888119242000 RCX: ffff8881207e5f00
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005
RBP: ffffc90000ecf7d0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff520001d9ee0 R12: ffff888119242000
R13: ffff8881192423c4 R14: 1ffff11023248478 R15: 0000000000000005
FS:  000055558bfbf500(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fba0fdec300 CR3: 000000010b39e000 CR4: 00000000003526b0
Call Trace:
 <TASK>
 __scsi_scan_target+0x62c/0xc20 drivers/scsi/scsi_scan.c:1771
 scsi_scan_channel drivers/scsi/scsi_scan.c:1842 [inline]
 scsi_scan_host_selected+0x352/0x610 drivers/scsi/scsi_scan.c:1871
 scsi_scan drivers/scsi/scsi_sysfs.c:151 [inline]
 store_scan+0x4ba/0x550 drivers/scsi/scsi_sysfs.c:191
 dev_attr_store+0x73/0xa0 drivers/base/core.c:2440
 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x75f/0xfd0 fs/read_write.c:684
 ksys_write+0x145/0x260 fs/read_write.c:737
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x7f/0x90 fs/read_write.c:746
 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f5ac319e159
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:00007fffefea3738 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f5ac3425fa0 RCX: 00007f5ac319e159
RDX: 0000000000000005 RSI: 0000200000001400 RDI: 0000000000000003
RBP: 00007f5ac3235024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5ac3425fac R14: 00007f5ac3425fa0 R15: 00007f5ac3425fa0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:scsi_target_reap+0x172/0x180 drivers/scsi/scsi_scan.c:594
Code: 81 fe e9 ef fe ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 46 ff ff ff 4c 89 ef e8 68 6e 81 fe e9 39 ff ff ff e8 1e 94 28 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 17 32 34 aa 90 90 90
RSP: 0018:ffffc90000ecf7a8 EFLAGS: 00010293
RAX: ffffffff835ee322 RBX: ffff888119242000 RCX: ffff8881207e5f00
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005
RBP: ffffc90000ecf7d0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff520001d9ee0 R12: ffff888119242000
R13: ffff8881192423c4 R14: 1ffff11023248478 R15: 0000000000000005
FS:  000055558bfbf500(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fba0fdec300 CR3: 000000010b39e000 CR4: 00000000003526b0

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/31 10:23 android16-6.12 96b3287eace8 2f52988a .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
2026/08/21 21:25 android16-6.12 3ab5872299d5 1e72964b .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
2026/08/21 20:42 android16-6.12 3ab5872299d5 1e72964b .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
2026/08/21 19:45 android16-6.12 3ab5872299d5 1e72964b .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
2026/08/21 18:52 android16-6.12 3ab5872299d5 1e72964b .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
2026/08/21 17:11 android16-6.12 3ab5872299d5 1e72964b .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
2026/08/21 16:22 android16-6.12 3ab5872299d5 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
2026/08/21 16:20 android16-6.12 3ab5872299d5 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: kobject bug in __scsi_remove_device
* Struck through repros no longer work on HEAD.