[v5.15] WARNING: proc registration bug in scsi_host_alloc

3 views
Skip to first unread message

syzbot

unread,
Apr 2, 2023, 9:46:37 PM4/2/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c957cbb87315 Linux 5.15.105
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10bfd469c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f83fab0469f5de7
dashboard link: https://syzkaller.appspot.com/bug?extid=c645abf505ed21f931b5
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/35817fda76e5/disk-c957cbb8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/80f96399b8d4/vmlinux-c957cbb8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4336a6ad59ec/bzImage-c957cbb8.xz

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

usb-storage 2-1:4.114: USB Mass Storage device detected
------------[ cut here ]------------
proc_dir_entry 'scsi/usb-storage' already registered
WARNING: CPU: 1 PID: 28684 at fs/proc/generic.c:377 proc_register+0x347/0x4e0 fs/proc/generic.c:376
Modules linked in:
CPU: 1 PID: 28684 Comm: kworker/1:7 Not tainted 5.15.105-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: usb_hub_wq hub_event
RIP: 0010:proc_register+0x347/0x4e0 fs/proc/generic.c:376
Code: 7c 24 08 4c 8b 64 24 28 48 8b 6c 24 20 74 08 48 89 ef e8 6c ba d0 ff 48 8b 55 00 48 c7 c7 80 ee 98 8a 48 89 de e8 79 54 53 ff <0f> 0b 48 c7 c7 c0 64 a4 8c e8 fb ec 27 08 48 8b 44 24 30 42 0f b6
RSP: 0018:ffffc9001124ea68 EFLAGS: 00010246
RAX: f3fac01341415400 RBX: ffff88814079ec24 RCX: 0000000000040000
RDX: ffffc9000ef4a000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffff8880622c9998 R08: ffffffff816612fc R09: fffff52002249c8d
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880622c9954
R13: 000000000000000b R14: dffffc0000000000 R15: ffff8880622c98c0
FS: 0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000010c CR3: 000000001fb3e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
_proc_mkdir fs/proc/generic.c:498 [inline]
proc_mkdir_data fs/proc/generic.c:507 [inline]
proc_mkdir+0x138/0x180 fs/proc/generic.c:521
scsi_proc_hostdir_add+0xc5/0x150 drivers/scsi/scsi_proc.c:108
scsi_host_alloc+0x9fe/0xe40 drivers/scsi/hosts.c:504
usb_stor_probe1+0x46/0x1a50 drivers/usb/storage/usb.c:952
storage_probe+0x3fd/0x1070 drivers/usb/storage/usb.c:1134
usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1c3/0x3f0 drivers/base/dd.c:750
driver_probe_device+0x50/0x420 drivers/base/dd.c:780
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:902
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:974
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3394
usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2170
usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1c3/0x3f0 drivers/base/dd.c:750
driver_probe_device+0x50/0x420 drivers/base/dd.c:780
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:902
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:974
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3394
usb_new_device+0xc17/0x18d0 drivers/usb/core/hub.c:2568
hub_port_connect drivers/usb/core/hub.c:5358 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5502 [inline]
port_event drivers/usb/core/hub.c:5648 [inline]
hub_event+0x2dd8/0x56d0 drivers/usb/core/hub.c:5730
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2306
worker_thread+0xaca/0x1280 kernel/workqueue.c:2453
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</TASK>


---
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,
Apr 2, 2023, 11:02:46 PM4/2/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: c957cbb87315 Linux 5.15.105
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12cd697dc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f83fab0469f5de7
dashboard link: https://syzkaller.appspot.com/bug?extid=c645abf505ed21f931b5
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=11eb1ed1c80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15de3d2ec80000
------------[ cut here ]------------
proc_dir_entry 'scsi/usb-storage' already registered
WARNING: CPU: 0 PID: 2079 at fs/proc/generic.c:377 proc_register+0x347/0x4e0 fs/proc/generic.c:376
Modules linked in:
CPU: 0 PID: 2079 Comm: kworker/0:4 Not tainted 5.15.105-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: usb_hub_wq hub_event

RIP: 0010:proc_register+0x347/0x4e0 fs/proc/generic.c:376
Code: 7c 24 08 4c 8b 64 24 28 48 8b 6c 24 20 74 08 48 89 ef e8 6c ba d0 ff 48 8b 55 00 48 c7 c7 80 ee 98 8a 48 89 de e8 79 54 53 ff <0f> 0b 48 c7 c7 c0 64 a4 8c e8 fb ec 27 08 48 8b 44 24 30 42 0f b6
RSP: 0018:ffffc9000673ea68 EFLAGS: 00010246
RAX: fe080ef13dc30400 RBX: ffff888144baf224 RCX: ffff88801ff4ba00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffff8880219255d8 R08: ffffffff816612fc R09: fffffbfff1f76e17
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888021925594
R13: 000000000000000b R14: dffffc0000000000 R15: ffff888021925500
FS: 0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc6ea2ec20 CR3: 000000007aa09000 CR4: 00000000003506f0
process_scheduled_works kernel/workqueue.c:2369 [inline]
worker_thread+0xdcf/0x1280 kernel/workqueue.c:2455

syzbot

unread,
Apr 8, 2023, 11:52:39 PM4/8/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 543aff194ab6 Linux 6.1.23
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1178db45c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=e9affea290775ea7
dashboard link: https://syzkaller.appspot.com/bug?extid=14bbf138b1bf9cacea4b
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6fe9097a8f09/disk-543aff19.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9df5aa0f6266/vmlinux-543aff19.xz
kernel image: https://storage.googleapis.com/syzbot-assets/84127c4bde2b/bzImage-543aff19.xz

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

usb 3-1: SerialNumber: syz
ums-sddr09 3-1:1.0: USB Mass Storage device detected
------------[ cut here ]------------
proc_dir_entry 'scsi/ums-sddr09' already registered
WARNING: CPU: 0 PID: 3854 at fs/proc/generic.c:377 proc_register+0x347/0x4e0 fs/proc/generic.c:376
Modules linked in:
CPU: 0 PID: 3854 Comm: kworker/0:8 Not tainted 6.1.23-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
Workqueue: usb_hub_wq hub_event
RIP: 0010:proc_register+0x347/0x4e0 fs/proc/generic.c:376
Code: 7c 24 08 4c 8b 64 24 28 48 8b 6c 24 20 74 08 48 89 ef e8 dc 3c cc ff 48 8b 55 00 48 c7 c7 00 82 fb 8a 48 89 de e8 89 b5 3e ff <0f> 0b 48 c7 c7 c0 30 07 8d e8 3b 51 74 08 48 8b 44 24 30 42 0f b6
RSP: 0018:ffffc90004b3eb28 EFLAGS: 00010246
RAX: cb7dd7b6c542a900 RBX: ffff8881408fac24 RCX: 0000000000040000
RDX: ffffc90014523000 RSI: 0000000000036c2e RDI: 0000000000036c2f
RBP: ffff88803d4aaad8 R08: ffffffff8152292e R09: ffffed1017304f1c
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88803d4aaa94
R13: 000000000000000a R14: dffffc0000000000 R15: ffff88803d4aaa00
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fac1ded2000 CR3: 0000000026edf000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
_proc_mkdir fs/proc/generic.c:498 [inline]
proc_mkdir_data fs/proc/generic.c:507 [inline]
proc_mkdir+0x138/0x180 fs/proc/generic.c:521
scsi_proc_hostdir_add+0xc5/0x150 drivers/scsi/scsi_proc.c:108
scsi_host_alloc+0xa26/0xe70 drivers/scsi/hosts.c:521
usb_stor_probe1+0x46/0x1a50 drivers/usb/storage/usb.c:952
sddr09_probe+0xeb/0x2a0 drivers/usb/storage/sddr09.c:1754
usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1c3/0x3f0 drivers/base/dd.c:778
driver_probe_device+0x50/0x420 drivers/base/dd.c:808
__device_attach_driver+0x2cf/0x510 drivers/base/dd.c:936
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:1008
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3664
usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2170
usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1c3/0x3f0 drivers/base/dd.c:778
driver_probe_device+0x50/0x420 drivers/base/dd.c:808
__device_attach_driver+0x2cf/0x510 drivers/base/dd.c:936
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:1008
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3664
usb_new_device+0xbdd/0x18e0 drivers/usb/core/hub.c:2575
hub_port_connect drivers/usb/core/hub.c:5355 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5499 [inline]
port_event drivers/usb/core/hub.c:5655 [inline]
hub_event+0x2d4d/0x57b0 drivers/usb/core/hub.c:5737
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

syzbot

unread,
May 23, 2023, 8:44:05 AM5/23/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: fa74641fb6b9 Linux 6.1.29
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1325d405280000
kernel config: https://syzkaller.appspot.com/x/.config?x=fac5c36c2b16009f
dashboard link: https://syzkaller.appspot.com/bug?extid=14bbf138b1bf9cacea4b
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=1301256a280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13b3228e280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3e78f005d7f8/disk-fa74641f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6527fcf66401/vmlinux-fa74641f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c5e0d5f8b434/bzImage-fa74641f.xz

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

------------[ cut here ]------------
proc_dir_entry 'scsi/usb-storage' already registered
WARNING: CPU: 0 PID: 3287 at fs/proc/generic.c:377 proc_register+0x347/0x4e0 fs/proc/generic.c:376
Modules linked in:
CPU: 0 PID: 3287 Comm: kworker/0:3 Not tainted 6.1.29-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Workqueue: usb_hub_wq hub_event
RIP: 0010:proc_register+0x347/0x4e0 fs/proc/generic.c:376
Code: 7c 24 08 4c 8b 64 24 28 48 8b 6c 24 20 74 08 48 89 ef e8 6c 18 cc ff 48 8b 55 00 48 c7 c7 80 8f fb 8a 48 89 de e8 89 49 3e ff <0f> 0b 48 c7 c7 c0 44 07 8d e8 3b db 77 08 48 8b 44 24 30 42 0f b6
RSP: 0018:ffffc900036cea68 EFLAGS: 00010246
RAX: 5aa40878dcbd7900 RBX: ffff888016a70864 RCX: ffff88801f4bd940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88814ba95998 R08: ffffffff81523d7e R09: fffff520006d9cc5
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88814ba95954
R13: 000000000000000b R14: dffffc0000000000 R15: ffff88814ba958c0
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5e052c2b90 CR3: 000000000cc8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
_proc_mkdir fs/proc/generic.c:498 [inline]
proc_mkdir_data fs/proc/generic.c:507 [inline]
proc_mkdir+0x138/0x180 fs/proc/generic.c:521
scsi_proc_hostdir_add+0xc5/0x150 drivers/scsi/scsi_proc.c:108
scsi_host_alloc+0xa26/0xe70 drivers/scsi/hosts.c:521
usb_stor_probe1+0x46/0x1a50 drivers/usb/storage/usb.c:952
storage_probe+0x3fd/0x1070 drivers/usb/storage/usb.c:1134
usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:783
driver_probe_device+0x50/0x420 drivers/base/dd.c:813
__device_attach_driver+0x2cf/0x510 drivers/base/dd.c:941
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:1013
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3664
usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2170
usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:783
driver_probe_device+0x50/0x420 drivers/base/dd.c:813
__device_attach_driver+0x2cf/0x510 drivers/base/dd.c:941
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:1013
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3664
usb_new_device+0xbdd/0x18e0 drivers/usb/core/hub.c:2575
hub_port_connect drivers/usb/core/hub.c:5355 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5499 [inline]
port_event drivers/usb/core/hub.c:5655 [inline]
hub_event+0x2d4d/0x57b0 drivers/usb/core/hub.c:5737
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>


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