INFO: trying to register non-static key in uhid_dev_destroy

11 views
Skip to first unread message

syzbot

unread,
Mar 6, 2020, 2:24:13 AM3/6/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7472c402 Linux 4.19.108
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1443a2e3e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=1bf7e5d5b217805a
dashboard link: https://syzkaller.appspot.com/bug?extid=4a54b9a2797163403267
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1315162de00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13461731e00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4a54b9...@syzkaller.appspotmail.com

hid-generic 0000:0000:0000.0059: hidraw0: <UNKNOWN> HID v0.00 Device [syz1 ] on s�z1
hid-generic 0000:0000:0000.005A: ignoring exceeding usage max
hid-generic 0000:0000:0000.005A: hidraw0: <UNKNOWN> HID v0.00 Device [syz1 ] on s�z1
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 0 PID: 8543 Comm: syz-executor297 Not tainted 4.19.108-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x188/0x20d lib/dump_stack.c:118
assign_lock_key kernel/locking/lockdep.c:727 [inline]
register_lock_class+0x14d0/0x16f0 kernel/locking/lockdep.c:753
__lock_acquire+0x154/0x49c0 kernel/locking/lockdep.c:3299
lock_acquire+0x170/0x400 kernel/locking/lockdep.c:3903
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x8c/0xbf kernel/locking/spinlock.c:152
__wake_up_common_lock+0xb0/0x170 kernel/sched/wait.c:120
uhid_dev_destroy+0x6f/0x100 drivers/hid/uhid.c:566
uhid_char_release+0x4e/0xb0 drivers/hid/uhid.c:645
__fput+0x2cd/0x890 fs/file_table.c:278
task_work_run+0x13f/0x1b0 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0xbcd/0x2f30 kernel/exit.c:880
do_group_exit+0x125/0x350 kernel/exit.c:983
get_signal+0x3ec/0x1f90 kernel/signal.c:2583
do_signal+0x8f/0x1710 arch/x86/kernel/signal.c:821
exit_to_usermode_loop+0x22b/0x2b0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446719
Code: Bad RIP value.
RSP: 002b:00007f888f97dd98 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000001 RBX: 00000000006dcc28 RCX: 0000000000446719
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00000000006dcc2c
RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc2c
R13: 00000000004ae628 R14: 35ec7cbe0f321716 R15: 5ee4618069da5e46
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8543 Comm: syz-executor297 Not tainted 4.19.108-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__wake_up_common+0xdf/0x640 kernel/sched/wait.c:85
Code: 05 00 00 4c 8b 43 38 49 83 e8 18 49 8d 78 18 48 39 3c 24 0f 84 6a 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <80> 3c 01 00 0f 85 3b 05 00 00 49 8b 40 18 89 54 24 10 31 db 48 bd
RSP: 0018:ffff88808b60f8a8 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff88808c8ec4c8 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 1ffffffff11f8a30 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffffffffffffffe8 R09: ffff88808b60f948
R10: ffffed101191d899 R11: ffff88808c8ec4cb R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004466ef CR3: 0000000008a6d000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__wake_up_common_lock+0xcd/0x170 kernel/sched/wait.c:121
uhid_dev_destroy+0x6f/0x100 drivers/hid/uhid.c:566
uhid_char_release+0x4e/0xb0 drivers/hid/uhid.c:645
__fput+0x2cd/0x890 fs/file_table.c:278
task_work_run+0x13f/0x1b0 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0xbcd/0x2f30 kernel/exit.c:880
do_group_exit+0x125/0x350 kernel/exit.c:983
get_signal+0x3ec/0x1f90 kernel/signal.c:2583
do_signal+0x8f/0x1710 arch/x86/kernel/signal.c:821
exit_to_usermode_loop+0x22b/0x2b0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446719
Code: Bad RIP value.
RSP: 002b:00007f888f97dd98 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000001 RBX: 00000000006dcc28 RCX: 0000000000446719
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00000000006dcc2c
RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc2c
R13: 00000000004ae628 R14: 35ec7cbe0f321716 R15: 5ee4618069da5e46
Modules linked in:
---[ end trace 7e7129cb929c6314 ]---
RIP: 0010:__wake_up_common+0xdf/0x640 kernel/sched/wait.c:85
Code: 05 00 00 4c 8b 43 38 49 83 e8 18 49 8d 78 18 48 39 3c 24 0f 84 6a 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <80> 3c 01 00 0f 85 3b 05 00 00 49 8b 40 18 89 54 24 10 31 db 48 bd
RSP: 0018:ffff88808b60f8a8 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff88808c8ec4c8 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 1ffffffff11f8a30 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffffffffffffffe8 R09: ffff88808b60f948
R10: ffffed101191d899 R11: ffff88808c8ec4cb R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004466ef CR3: 0000000008a6d000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Mar 12, 2020, 11:28:13 PM3/12/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 12cd844a Linux 4.14.173
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14c62c1de00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8a9d0602a0f7791e
dashboard link: https://syzkaller.appspot.com/bug?extid=4fe289b3af6b13b923a1
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16ca4475e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1509f41de00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4fe289...@syzkaller.appspotmail.com

hid-generic 0000:0000:0000.0076: hidraw0: <UNKNOWN> HID v0.00 Device [syz1 ] on s�z1
hid-generic 0000:0000:0000.0077: ignoring exceeding usage max
hid-generic 0000:0000:0000.0077: hidraw0: <UNKNOWN> HID v0.00 Device [syz1 ] on s�z1
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 7699 Comm: syz-executor249 Not tainted 4.14.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x13e/0x194 lib/dump_stack.c:58
register_lock_class+0x2fe/0x1600 kernel/locking/lockdep.c:768
__lock_acquire+0x147/0x4620 kernel/locking/lockdep.c:3374
lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3994
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x8c/0xbf kernel/locking/spinlock.c:160
__wake_up_common_lock+0x9d/0x140 kernel/sched/wait.c:124
uhid_dev_destroy+0x62/0x100 drivers/hid/uhid.c:566
uhid_char_release+0x4c/0xa0 drivers/hid/uhid.c:645
__fput+0x25f/0x790 fs/file_table.c:210
task_work_run+0x113/0x190 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9f2/0x2b00 kernel/exit.c:858
do_group_exit+0x100/0x310 kernel/exit.c:955
SYSC_exit_group kernel/exit.c:966 [inline]
SyS_exit_group+0x19/0x20 kernel/exit.c:964
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4452e8
RSP: 002b:00007ffe6674a458 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004452e8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004cdc50 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 00007ffe6674a4b0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006e1320 R14: 000000000000002d R15: 20c49ba5e353f7cf
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7699 Comm: syz-executor249 Not tainted 4.14.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a4948580 task.stack: ffff8880a8650000
RIP: 0010:__wake_up_common+0x9e/0x5d0 kernel/sched/wait.c:90
RSP: 0018:ffff8880a8657b90 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff88808b839508 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffffffffffffffe8 R09: ffff8880a8657c30
R10: fffffbfff14a8cd5 R11: ffff8880a4948580 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004cdc90 CR3: 0000000007c6a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__wake_up_common_lock+0xba/0x140 kernel/sched/wait.c:125
uhid_dev_destroy+0x62/0x100 drivers/hid/uhid.c:566
uhid_char_release+0x4c/0xa0 drivers/hid/uhid.c:645
__fput+0x25f/0x790 fs/file_table.c:210
task_work_run+0x113/0x190 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9f2/0x2b00 kernel/exit.c:858
do_group_exit+0x100/0x310 kernel/exit.c:955
SYSC_exit_group kernel/exit.c:966 [inline]
SyS_exit_group+0x19/0x20 kernel/exit.c:964
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4452e8
RSP: 002b:00007ffe6674a458 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004452e8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004cdc50 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 00007ffe6674a4b0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006e1320 R14: 000000000000002d R15: 20c49ba5e353f7cf
Code: bc 04 00 00 4c 8b 43 38 49 83 e8 18 49 8d 78 18 48 39 3c 24 0f 84 6a 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <80> 3c 01 00 0f 85 a1 04 00 00 49 8b 40 18 89 54 24 10 31 db 48
RIP: __wake_up_common+0x9e/0x5d0 kernel/sched/wait.c:90 RSP: ffff8880a8657b90
---[ end trace 3ba136c2952c1b0a ]---

syzbot

unread,
Sep 19, 2020, 6:15:08 PM9/19/20
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit abae259fdccc5e41ff302dd80a2b944ce385c970
Author: Marc Zyngier <m...@kernel.org>
Date: Sat Aug 29 11:26:01 2020 +0000

HID: core: Correctly handle ReportSize being zero

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11720ac3900000
start commit: 7edd66cf Linux 4.19.118
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=8dd19d0705ec9e0
dashboard link: https://syzkaller.appspot.com/bug?extid=4a54b9a2797163403267
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15201378100000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10f7e580100000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: HID: core: Correctly handle ReportSize being zero

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages