syzbot


WARNING: refcount bug in get_device

Status: auto-obsoleted due to no activity on 2024/09/24 10:41
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+d7a963db6c1fd5db7445@syzkaller.appspotmail.com
First crash: 119d, last: 109d

Sample crash report:
usb 18-1: SetAddress Request (55) to port 0
usb 18-1: new SuperSpeed USB device number 55 using vhci_hcd
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 1 PID: 3877 at lib/refcount.c:25 refcount_warn_saturate+0x1ca/0x210 lib/refcount.c:25
Modules linked in:
CPU: 1 PID: 3877 Comm: kworker/1:6 Not tainted 6.10.0-rc5-syzkaller-00018-g55027e689933 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: usb_hub_wq hub_event
RIP: 0010:refcount_warn_saturate+0x1ca/0x210 lib/refcount.c:25
Code: ff 89 de e8 28 48 0b fd 84 db 0f 85 e6 fe ff ff e8 7b 4d 0b fd c6 05 91 33 4b 0b 01 90 48 c7 c7 60 96 8f 8b e8 57 68 cd fc 90 <0f> 0b 90 90 e9 c3 fe ff ff e8 58 4d 0b fd c6 05 6c 33 4b 0b 01 90
RSP: 0018:ffffc900034a7510 EFLAGS: 00010086
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff81500069
RDX: ffff888025f58000 RSI: ffffffff81500076 RDI: 0000000000000001
RBP: ffff88807b5870e0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 00000000000fce08 R12: ffff88807b5870e0
R13: ffff888023e34448 R14: 0000000000000100 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055559427f608 CR3: 00000000691f0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __refcount_add include/linux/refcount.h:190 [inline]
 __refcount_inc include/linux/refcount.h:241 [inline]
 refcount_inc include/linux/refcount.h:258 [inline]
 kref_get include/linux/kref.h:45 [inline]
 kobject_get+0x135/0x150 lib/kobject.c:643
 get_device+0x22/0x40 drivers/base/core.c:3775
 usb_get_dev+0x23/0x40 drivers/usb/core/usb.c:765
 vhci_urb_enqueue+0x57f/0xe20 drivers/usb/usbip/vhci_hcd.c:785
 usb_hcd_submit_urb+0x2d1/0x2090 drivers/usb/core/hcd.c:1533
 usb_submit_urb+0x87c/0x1730 drivers/usb/core/urb.c:581
 usb_start_wait_urb+0x103/0x4c0 drivers/usb/core/message.c:59
 usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
 usb_control_msg+0x327/0x4b0 drivers/usb/core/message.c:154
 get_bMaxPacketSize0.constprop.0+0xa5/0x1c0 drivers/usb/core/hub.c:4805
 hub_port_init+0xcc3/0x3a50 drivers/usb/core/hub.c:5066
 hub_port_connect drivers/usb/core/hub.c:5450 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
 port_event drivers/usb/core/hub.c:5821 [inline]
 hub_event+0x2b65/0x4e20 drivers/usb/core/hub.c:5903
 process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
 process_scheduled_works kernel/workqueue.c:3312 [inline]
 worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
 kthread+0x2c1/0x3a0 kernel/kthread.c:389
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/26 10:40 upstream 55027e689933 dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in get_device
2024/06/17 04:51 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in get_device
* Struck through repros no longer work on HEAD.