syzbot


WARNING in uvc_status_unregister

Status: upstream: reported C repro on 2024/10/20 06:44
Subsystems: usb media
[Documentation on labels]
Reported-by: syzbot+9446d5e0d25571e6a212@syzkaller.appspotmail.com
Fix commit: media: uvcvideo: Fix deadlock during uvc_probe
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 71d, last: now
Cause bisection: introduced by (bisect log) :
commit c5fe3ed618f995b4a903e574bf2e993cdebeefca
Author: Ricardo Ribalda <ribalda@chromium.org>
Date: Thu Sep 26 05:49:58 2024 +0000

  media: uvcvideo: Avoid race condition during unregister

Crash: WARNING in uvc_status_unregister (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly usb report (Dec 2024) 0 (1) 2024/12/17 09:47
[PATCH] media: uvcvideo: Fix deadlock during uvc_probe 3 (3) 2024/11/07 22:05
[syzbot] [media?] WARNING in uvc_status_unregister 3 (5) 2024/10/22 08:41
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/20 08:07 21m hdanton@sina.com patch linux-next OK log

Sample crash report:
usb 1-1: Found UVC 0.08 device syz (046d:0823)
usb 1-1: No valid video chain found.
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: CPU: 1 PID: 47 at kernel/locking/mutex.c:564 __mutex_lock_common kernel/locking/mutex.c:564 [inline]
WARNING: CPU: 1 PID: 47 at kernel/locking/mutex.c:564 __mutex_lock+0xdac/0xee0 kernel/locking/mutex.c:735
Modules linked in:
CPU: 1 UID: 0 PID: 47 Comm: kworker/1:1 Not tainted 6.13.0-rc3-syzkaller-00193-ge9b8ffafd20a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: usb_hub_wq hub_event
RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:564 [inline]
RIP: 0010:__mutex_lock+0xdac/0xee0 kernel/locking/mutex.c:735
Code: 0f b6 04 38 84 c0 0f 85 1a 01 00 00 83 3d 2f 85 4f 04 00 75 19 90 48 c7 c7 e0 82 0a 8c 48 c7 c6 80 83 0a 8c e8 b5 ec 95 f5 90 <0f> 0b 90 90 90 e9 c7 f3 ff ff 90 0f 0b 90 e9 29 f8 ff ff 90 0f 0b
RSP: 0018:ffffc90000b76940 EFLAGS: 00010246
RAX: fe761b5f58ca3700 RBX: ffff88803264a518 RCX: ffff888020ea0000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90000b76ad0 R08: ffffffff81601a42 R09: fffffbfff1cfa210
R10: dffffc0000000000 R11: fffffbfff1cfa210 R12: 0000000000000000
R13: 0000000000000000 R14: 1ffff9200016ed3c R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564d3b9fe810 CR3: 000000007b72a000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 class_mutex_constructor include/linux/mutex.h:201 [inline]
 uvc_status_suspend drivers/media/usb/uvc/uvc_status.c:375 [inline]
 uvc_status_unregister+0x2f/0xe0 drivers/media/usb/uvc/uvc_status.c:297
 uvc_unregister_video+0x12b/0x200 drivers/media/usb/uvc/uvc_driver.c:1977
 uvc_probe+0x9154/0x98e0 drivers/media/usb/uvc/uvc_driver.c:2302
 usb_probe_interface+0x641/0xbb0 drivers/usb/core/driver.c:396
 really_probe+0x2b8/0xad0 drivers/base/dd.c:658
 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800
 driver_probe_device+0x50/0x430 drivers/base/dd.c:830
 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:958
 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:459
 __device_attach+0x333/0x520 drivers/base/dd.c:1030
 bus_probe_device+0x189/0x260 drivers/base/bus.c:534
 device_add+0x856/0xbf0 drivers/base/core.c:3665
 usb_set_configuration+0x1976/0x1fb0 drivers/usb/core/message.c:2210
 usb_generic_driver_probe+0x88/0x140 drivers/usb/core/generic.c:254
 usb_probe_device+0x1b8/0x380 drivers/usb/core/driver.c:291
 really_probe+0x2b8/0xad0 drivers/base/dd.c:658
 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800
 driver_probe_device+0x50/0x430 drivers/base/dd.c:830
 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:958
 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:459
 __device_attach+0x333/0x520 drivers/base/dd.c:1030
 bus_probe_device+0x189/0x260 drivers/base/bus.c:534
 device_add+0x856/0xbf0 drivers/base/core.c:3665
 usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2651
 hub_port_connect drivers/usb/core/hub.c:5521 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
 port_event drivers/usb/core/hub.c:5821 [inline]
 hub_event+0x2d6d/0x5150 drivers/usb/core/hub.c:5903
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
 worker_thread+0x870/0xd30 kernel/workqueue.c:3391
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (33711):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/21 03:11 upstream e9b8ffafd20a 1ac6aa80 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/01 10:22 upstream c4bb3a2d641c 68914665 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in uvc_status_unregister
2024/11/25 00:20 upstream 9f16d5e6f220 68da6d95 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in uvc_status_unregister
2024/12/16 08:30 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d8d936c51388 7cbfbb3a .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/08 09:19 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d8d936c51388 9ac0fdc6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/10/17 10:45 linux-next 15e7d45e786a 666f77ed .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in uvc_status_unregister
2024/12/26 10:52 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in uvc_status_unregister
2024/12/26 10:25 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/26 10:21 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in uvc_status_unregister
2024/12/26 09:21 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/26 07:44 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in uvc_status_unregister
2024/12/26 00:37 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in uvc_status_unregister
2024/12/26 00:08 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/25 23:42 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/25 22:26 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/25 20:51 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/25 16:15 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in uvc_status_unregister
2024/12/25 15:42 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in uvc_status_unregister
2024/12/25 14:33 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in uvc_status_unregister
2024/12/25 10:09 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in uvc_status_unregister
2024/12/25 09:51 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in uvc_status_unregister
2024/12/26 08:14 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in uvc_status_unregister
2024/12/26 05:10 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in uvc_status_unregister
2024/12/25 20:35 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in uvc_status_unregister
2024/12/25 12:33 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in uvc_status_unregister
2024/12/25 09:10 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in uvc_status_unregister
2024/12/25 09:07 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in uvc_status_unregister
2024/12/26 11:54 upstream 9b2ffa6148b1 d3ccff63 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in uvc_status_unregister
2024/12/26 05:47 upstream 9b2ffa6148b1 444551c4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in uvc_status_unregister
2024/12/26 02:32 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in uvc_status_unregister
2024/12/26 02:32 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in uvc_status_unregister
2024/12/26 11:32 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 11:20 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 08:49 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 07:21 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 06:34 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 04:29 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 04:23 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 03:21 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/26 01:31 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 23:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 21:41 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 21:15 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 19:47 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 19:07 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 18:27 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 17:50 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 17:19 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 16:44 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 15:23 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 15:09 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 13:59 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 13:16 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 11:46 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 11:13 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 10:52 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/25 09:16 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d7123c77dc60 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb WARNING in uvc_status_unregister
2024/12/20 05:23 linux-next 8503810115fb 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in uvc_status_unregister
2024/12/18 15:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e7aff49b5da a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in uvc_status_unregister
* Struck through repros no longer work on HEAD.