BUG: spinlock bad magic in gadget_dev_open

Status: upstream: reported on 2026/08/12 22:54
Subsystems: usb
Labels: prio:normal
[Documentation on labels]
Reported-by: syzbot+7659afffb6c3d2d12b83@syzkaller.appspotmail.com
First crash: 65d, last: 8d14h
▶ ▼ ✨ AI Jobs (7)
ID Workflow Result Correct Bug Created Started Finished Revision
a0f64650 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ BUG: spinlock bad magic in gadget_dev_open 2026/08/18 00:08 2026/08/18 00:08 2026/08/18 00:14 1e72964b
f5316e7c repro-c Reproduced: ✅ ❓ BUG: spinlock bad magic in gadget_dev_open 2026/08/13 14:38 2026/08/13 20:43 2026/08/13 21:54 0165196a
3f991752 repro-c Reproduced: ✅ ❓ BUG: spinlock bad magic in gadget_dev_open 2026/08/13 10:22 2026/08/13 10:22 2026/08/13 11:47 67796a05
ec3c9d20 assessment-security 💥 BUG: spinlock bad magic in gadget_dev_open 2026/08/09 09:09 2026/08/09 09:09 2026/08/09 09:09 5d63f80b
295d994c assessment-security 💥 BUG: spinlock bad magic in gadget_dev_open 2026/08/02 00:53 2026/08/02 00:53 2026/08/02 00:53 e611ffe1
3db23fc7 assessment-security 💥 BUG: spinlock bad magic in gadget_dev_open 2026/07/31 00:48 2026/07/31 00:48 2026/07/31 00:48 aaffb173
f31db00e assessment-security 💥 BUG: spinlock bad magic in gadget_dev_open 2026/07/29 00:55 2026/07/29 00:55 2026/07/29 00:55 7be3c40b
▶ ▼ Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [usb?] BUG: spinlock bad magic in gadget_dev_open 0 (1) 2026/08/12 22:54
▶ ▼ Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 BUG: spinlock bad magic in btrfs_encoded_read_endio 4 6 14d 194d 0/3 upstream: reported on 2026/03/20 05:11
linux-5.15 BUG: spinlock bad magic in release_metapage origin:upstream 19 syz, C error 95 26d 745d 0/3 upstream: reported C repro on 2024/09/15 11:43
linux-6.6 BUG: spinlock bad magic in release_metapage origin:upstream 4 syz, C error 11 116d 309d 0/2 upstream: reported C repro on 2025/11/25 20:12
linux-6.1 BUG: spinlock bad magic in release_metapage origin:upstream 4 syz, C error 92 16d 726d 0/3 upstream: reported C repro on 2024/10/04 04:01
upstream BUG: spinlock bad magic in release_metapage prio:high jfs 15 syz, C inconclusive 878 3d07h 750d 0/29 upstream: reported C repro on 2024/09/10 08:16
▶ ▼ Last patch testing requests (2)
Created Duration User Patch Repo Result
2026/08/14 08:23 20m nogikh@google.com upstream report job log log
2026/08/13 12:05 19m nogikh@google.com upstream report job log log

Sample crash report:
BUG: spinlock bad magic on CPU#2, syz.3.410/7089
 lock: 0xffff88802cbe3800, .magic: 00000000, .owner: <none>/-1, .owner_cpu: -1983825680
CPU: 2 UID: 0 PID: 7089 Comm: syz.3.410 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 spin_bug kernel/locking/spinlock_debug.c:78 [inline]
 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
 do_raw_spin_lock.cold+0x37/0x3c kernel/locking/spinlock_debug.c:115
 spin_lock_irq include/linux/spinlock.h:377 [inline]
 gadget_dev_open+0x44/0x1b0 drivers/usb/gadget/legacy/inode.c:1929
 do_dentry_open+0x6ab/0x14d0 fs/open.c:996
 vfs_open+0x82/0x3f0 fs/open.c:1101
 do_open fs/namei.c:4837 [inline]
 path_openat+0x19fa/0x2440 fs/namei.c:5000
 do_file_open+0x20e/0x430 fs/namei.c:5029
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417
 do_sys_open fs/open.c:1423 [inline]
 __do_sys_openat fs/open.c:1439 [inline]
 __se_sys_openat fs/open.c:1434 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1434
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f085499e159
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:00007f085582a028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f0854c25fa0 RCX: 00007f085499e159
RDX: 0000000000000002 RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f0854a3506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0854c26038 R14: 00007f0854c25fa0 R15: 00007ffe8c105888
 </TASK>

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/22 07:44 upstream f0100363d8c3 e12281bd .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: spinlock bad magic in gadget_dev_open
2026/08/12 22:53 upstream 3d6d817622b0 359b2492 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: spinlock bad magic in gadget_dev_open
2026/08/12 22:34 upstream 3d6d817622b0 359b2492 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: spinlock bad magic in gadget_dev_open
2026/07/27 06:31 upstream 4235cb24ec1e 4a865b71 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: spinlock bad magic in gadget_dev_open
2026/07/27 06:18 upstream 4235cb24ec1e 4a865b71 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: spinlock bad magic in gadget_dev_open
2026/07/27 05:50 upstream 4235cb24ec1e 4a865b71 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: spinlock bad magic in gadget_dev_open
2026/09/13 08:33 linux-next 9d80aa4617b3 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce BUG: spinlock bad magic in gadget_dev_open
2026/08/31 13:59 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1b8fa82cab7 2f52988a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: spinlock bad magic in gadget_dev_open
2026/08/30 22:14 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1b8fa82cab7 2f52988a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: spinlock bad magic in gadget_dev_open
2026/08/30 14:17 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1b8fa82cab7 2f52988a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: spinlock bad magic in gadget_dev_open
2026/08/30 02:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1b8fa82cab7 2f52988a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: spinlock bad magic in gadget_dev_open
2026/08/29 04:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1b8fa82cab7 bcbc8ceb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: spinlock bad magic in gadget_dev_open
* Struck through repros no longer work on HEAD.