syzbot


INFO: trying to register non-static key in uhid_char_release

Status: fixed on 2020/09/28 22:53
Reported-by: syzbot+39e8e12e01e60e6cf087@syzkaller.appspotmail.com
Fix commit: abae259fdccc HID: core: Correctly handle ReportSize being zero
First crash: 1356d, last: 1333d
Fix bisection: fixed by (bisect log) :
commit abae259fdccc5e41ff302dd80a2b944ce385c970
Author: Marc Zyngier <maz@kernel.org>
Date: Sat Aug 29 11:26:01 2020 +0000

  HID: core: Correctly handle ReportSize being zero

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 INFO: trying to register non-static key in uhid_char_release C done 2 1333d 1352d 1/1 fixed on 2020/09/28 23:05
upstream INFO: trying to register non-static key in uhid_char_release C done done 26 1331d 1509d 15/26 fixed on 2020/11/16 12:12

Sample crash report:
hid-generic 1000:0000:0000.0029: hidraw0: <UNKNOWN> HID v0.00 Device [syz0] on syz0
hid-generic 1000:0000:0000.002A: hidraw0: <UNKNOWN> HID v0.00 Device [syz0] on syz0
hid-generic 1000:0000:0000.002B: hidraw0: <UNKNOWN> HID v0.00 Device [syz0] on syz0
hid-generic 1000:0000:0000.002C: hidraw0: <UNKNOWN> HID v0.00 Device [syz0] on syz0
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 0 PID: 6818 Comm: syz-executor705 Not tainted 4.19.142-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+0x1fc/0x2fe lib/dump_stack.c:118
 assign_lock_key kernel/locking/lockdep.c:727 [inline]
 register_lock_class+0xe76/0x11c0 kernel/locking/lockdep.c:753
 __lock_acquire+0x17d/0x3ff0 kernel/locking/lockdep.c:3303
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152
 __wake_up_common_lock+0xb0/0x170 kernel/sched/wait.c:120
 uhid_dev_destroy drivers/hid/uhid.c:566 [inline]
 uhid_char_release+0x9b/0x190 drivers/hid/uhid.c:645
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xbb2/0x2b70 kernel/exit.c:887
 do_group_exit+0x125/0x310 kernel/exit.c:990
 __do_sys_exit_group kernel/exit.c:1001 [inline]
 __se_sys_exit_group kernel/exit.c:999 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:999
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43ff88
Code: Bad RIP value.
RSP: 002b:00007fff1d0be1f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ff88
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c0930 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d2180 R14: 0000000000000000 R15: 0000000000000000
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: 6818 Comm: syz-executor705 Not tainted 4.19.142-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__wake_up_common+0xdf/0x650 kernel/sched/wait.c:85
Code: 05 00 00 4c 8b 43 38 49 83 e8 18 49 8d 78 18 48 3b 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 3e 05 00 00 49 8b 40 18 89 54 24 10 31 db 48 bd
RSP: 0018:ffff8880a0037b88 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff8880a0a63148 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 1ffffffff1238dc0 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffffffffffffffe8 R09: ffff8880a0037c28
R10: ffff8880a0a6314b R11: ffffffff8ad3801b R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000002059880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043ff5e CR3: 0000000008c6d000 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 drivers/hid/uhid.c:566 [inline]
 uhid_char_release+0x9b/0x190 drivers/hid/uhid.c:645
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xbb2/0x2b70 kernel/exit.c:887
 do_group_exit+0x125/0x310 kernel/exit.c:990
 __do_sys_exit_group kernel/exit.c:1001 [inline]
 __se_sys_exit_group kernel/exit.c:999 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:999
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43ff88
Code: Bad RIP value.
RSP: 002b:00007fff1d0be1f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ff88
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c0930 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d2180 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 8aba2dd23b240ab4 ]---
RIP: 0010:__wake_up_common+0xdf/0x650 kernel/sched/wait.c:85
Code: 05 00 00 4c 8b 43 38 49 83 e8 18 49 8d 78 18 48 3b 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 3e 05 00 00 49 8b 40 18 89 54 24 10 31 db 48 bd
RSP: 0018:ffff8880a0037b88 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff8880a0a63148 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 1ffffffff1238dc0 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffffffffffffffe8 R09: ffff8880a0037c28
R10: ffff8880a0a6314b R11: ffffffff8ad3801b R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000002059880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043ff5e CR3: 0000000008c6d000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/08/29 12:14 linux-4.19.y f6d5cb9e2c06 d5a3ae1f .config console log report syz C ci2-linux-4-19
2020/08/07 06:07 linux-4.19.y c076c79e03c6 cb436c69 .config console log report syz C ci2-linux-4-19
2020/08/07 05:28 linux-4.19.y c076c79e03c6 cb436c69 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.