syzbot


possible deadlock in chaoskey_release

Status: upstream: reported C repro on 2024/10/09 03:33
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+685e14d04fe35692d3bc@syzkaller.appspotmail.com
Fix commit: USB: chaoskey: Fix possible deadlock chaoskey_list_lock
Patched on: [ci-upstream-linux-next-kasan-gce-root ci2-upstream-usb], 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]
First crash: 31d, last: 22d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH next] USB: chaoskey: Fix possible deadlock chaoskey_list_lock 1 (1) 2024/10/09 14:52
[syzbot] [usb?] possible deadlock in chaoskey_release 1 (3) 2024/10/09 13:59
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/09 08:43 1h24m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing OK log

Sample crash report:
raw-gadget.0 gadget.0: fail, usb_ep_enable returned -22
============================================
WARNING: possible recursive locking detected
6.12.0-rc1-syzkaller-00027-g4a9fe2a8ac53 #0 Not tainted
--------------------------------------------
syz-executor363/2651 is trying to acquire lock:
ffffffff89b120e8 (chaoskey_list_lock){+.+.}-{3:3}, at: chaoskey_release+0x15d/0x2c0 drivers/usb/misc/chaoskey.c:322

but task is already holding lock:
ffffffff89b120e8 (chaoskey_list_lock){+.+.}-{3:3}, at: chaoskey_release+0x7f/0x2c0 drivers/usb/misc/chaoskey.c:299

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(chaoskey_list_lock);
  lock(chaoskey_list_lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by syz-executor363/2651:
 #0: ffffffff89b120e8 (chaoskey_list_lock){+.+.}-{3:3}, at: chaoskey_release+0x7f/0x2c0 drivers/usb/misc/chaoskey.c:299

stack backtrace:
CPU: 0 UID: 0 PID: 2651 Comm: syz-executor363 Not tainted 6.12.0-rc1-syzkaller-00027-g4a9fe2a8ac53 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 print_deadlock_bug+0x2e3/0x410 kernel/locking/lockdep.c:3037
 check_deadlock kernel/locking/lockdep.c:3089 [inline]
 validate_chain kernel/locking/lockdep.c:3891 [inline]
 __lock_acquire+0x2185/0x3ce0 kernel/locking/lockdep.c:5202
 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
 __mutex_lock_common kernel/locking/mutex.c:608 [inline]
 __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752
 chaoskey_release+0x15d/0x2c0 drivers/usb/misc/chaoskey.c:322
 __fput+0x3f6/0xb60 fs/file_table.c:431
 task_work_run+0x14e/0x250 kernel/task_work.c:228
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0xadd/0x2ce0 kernel/exit.c:939
 do_group_exit+0xd3/0x2a0 kernel/exit.c:1088
 __do_sys_exit_group kernel/exit.c:1099 [inline]
 __se_sys_exit_group kernel/exit.c:1097 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1097
 x64_sys_call+0x14a9/0x16a0 arch/x86/include/generated/asm/syscalls_64.h:232
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd87e4bb409
Code: Unable to access opcode bytes at 0x7fd87e4bb3df.
RSP: 002b:00007ffcb70ccdd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd87e4bb409
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007fd87e536370 R08: ffffffffffffffb8 R09: 00007ffcb70ccb47
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd87e536370
R13: 0000000000000000 R14: 00007fd87e53a080 R15: 00007fd87e489670
 </TASK>

Crashes (90):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/05 07:12 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 06:15 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 05:45 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 05:37 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 05:23 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 05:10 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 04:44 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 04:43 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 04:22 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 04:08 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/05 03:58 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/14 09:37 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/14 07:34 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/13 19:26 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/13 15:23 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/13 11:53 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/13 11:52 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/13 10:01 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/13 04:16 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/13 02:08 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/12 23:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/12 15:32 linux-next d61a00525464 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/12 12:32 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/12 09:27 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/11 20:08 linux-next d61a00525464 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/11 13:59 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/11 13:03 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/11 10:02 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/11 04:55 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/11 01:55 linux-next 0cca97bf2364 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 22:22 linux-next 0cca97bf2364 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 21:15 linux-next 0cca97bf2364 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 19:33 linux-next 0cca97bf2364 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 14:57 linux-next 0cca97bf2364 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 13:40 linux-next 0cca97bf2364 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 12:21 linux-next 0cca97bf2364 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 10:56 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/10 09:27 linux-next 0cca97bf2364 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 08:10 linux-next 0cca97bf2364 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 07:04 linux-next 0cca97bf2364 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 07:04 linux-next 0cca97bf2364 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in chaoskey_release
2024/10/10 06:56 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/10 04:14 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/10 00:25 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 56fb2cb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/09 20:17 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 56fb2cb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/09 00:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/08 20:26 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 23:07 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 22:34 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 19:27 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 17:23 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 17:04 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 16:34 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 09:10 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 07:36 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 06:08 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/07 04:02 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
2024/10/06 22:50 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb possible deadlock in chaoskey_release
* Struck through repros no longer work on HEAD.