syzbot
INFO: trying to register non-static key in gadget_dev_open
Status:
upstream: reported on 2026/11/07 09:14
Reported-by: syzbot+57d98287adb579896760@syzkaller.appspotmail.com
First crash: 6d05h, last: 6d05h
Sample crash report:
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 1 PID: 8767 Comm: syz.5.1010 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
assign_lock_key+0x201/0x230 kernel/locking/lockdep.c:1004
register_lock_class+0x21d/0x870 kernel/locking/lockdep.c:1317
__lock_acquire+0x277/0x7ea0 kernel/locking/lockdep.c:5048
lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790
__raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
_raw_spin_lock_irq+0xab/0xf0 kernel/locking/spinlock.c:170
spin_lock_irq include/linux/spinlock.h:376 [inline]
gadget_dev_open+0x47/0x1b0 drivers/usb/gadget/legacy/inode.c:1910
do_dentry_open+0x7dd/0x10b0 fs/open.c:882
do_open fs/namei.c:3677 [inline]
path_openat+0x2674/0x2f10 fs/namei.c:3838
do_filp_open+0x1ee/0x420 fs/namei.c:3865
do_sys_openat2+0x14b/0x4f0 fs/open.c:1320
do_sys_open fs/open.c:1336 [inline]
__do_sys_openat fs/open.c:1352 [inline]
__se_sys_openat fs/open.c:1347 [inline]
__x64_sys_openat+0x135/0x160 fs/open.c:1347
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7efd9659fb19
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:00007efd97407028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007efd96825fa0 RCX: 00007efd9659fb19
RDX: 0000000000000002 RSI: 0000200000000240 RDI: ffffffffffffff9c
RBP: 00007efd96637b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000084 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efd96826038 R14: 00007efd96825fa0 R15: 00007fffcacded78
</TASK>
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 1 PID: 8767 at lib/refcount.c:25 refcount_warn_saturate+0xff/0x1a0 lib/refcount.c:25
Modules linked in:
CPU: 1 PID: 8767 Comm: syz.5.1010 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
RIP: 0010:refcount_warn_saturate+0xff/0x1a0 lib/refcount.c:25
Code: 0a 01 48 c7 c7 e0 2f fe 8a e8 fd d2 3c fd 0f 0b eb e0 e8 34 71 71 fd c6 05 cc cd fc 0a 01 48 c7 c7 20 2f fe 8a e8 e1 d2 3c fd <0f> 0b eb c4 e8 18 71 71 fd c6 05 b1 cd fc 0a 01 48 c7 c7 80 2f fe
RSP: 0018:ffffc9000586f8a8 EFLAGS: 00010046
RAX: cb4c721007974900 RBX: 0000000000000002 RCX: 0000000000080000
RDX: ffffc90004e01000 RSI: 0000000000065ada RDI: 0000000000065adb
RBP: 0000000000000000 R08: ffff8880b8d279db R09: 1ffff110171a4f3b
R10: dffffc0000000000 R11: ffffed10171a4f3c R12: ffff888028720848
R13: dffffc0000000000 R14: 0000000000000002 R15: 1ffff110050e4109
FS: 00007efd974076c0(0000) GS:ffff8880b8d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f34de813000 CR3: 000000002fdec000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__refcount_add include/linux/refcount.h:-1 [inline]
__refcount_inc include/linux/refcount.h:250 [inline]
refcount_inc include/linux/refcount.h:267 [inline]
get_dev drivers/usb/gadget/legacy/inode.c:154 [inline]
gadget_dev_open+0x14c/0x1b0 drivers/usb/gadget/legacy/inode.c:1915
do_dentry_open+0x7dd/0x10b0 fs/open.c:882
do_open fs/namei.c:3677 [inline]
path_openat+0x2674/0x2f10 fs/namei.c:3838
do_filp_open+0x1ee/0x420 fs/namei.c:3865
do_sys_openat2+0x14b/0x4f0 fs/open.c:1320
do_sys_open fs/open.c:1336 [inline]
__do_sys_openat fs/open.c:1352 [inline]
__se_sys_openat fs/open.c:1347 [inline]
__x64_sys_openat+0x135/0x160 fs/open.c:1347
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7efd9659fb19
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:00007efd97407028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007efd96825fa0 RCX: 00007efd9659fb19
RDX: 0000000000000002 RSI: 0000200000000240 RDI: ffffffffffffff9c
RBP: 00007efd96637b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000084 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efd96826038 R14: 00007efd96825fa0 R15: 00007fffcacded78
</TASK>
* Struck through repros no longer work on HEAD.