syzbot


INFO: trying to register non-static key in uhid_char_release

Status: fixed on 2020/11/16 12:12
Reported-by: syzbot+8357fbef0d7bb602de45@syzkaller.appspotmail.com
Fix commit: bce1305c0ece HID: core: Correctly handle ReportSize being zero
First crash: 1497d, last: 1320d
Cause bisection: introduced by (bisect log) :
commit 84a4062632462c4320704fcdf8e99e89e94c0aba
Author: Johan Korsnes <jkorsnes@cisco.com>
Date: Fri Jan 17 12:08:36 2020 +0000

  HID: core: increase HID report buffer size to 8KiB

Crash: INFO: trying to register non-static key in uhid_dev_destroy (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit bce1305c0ece3dc549663605e567655dd701752c
Author: Marc Zyngier <maz@kernel.org>
Date: Sat Aug 29 11:26:01 2020 +0000

  HID: core: Correctly handle ReportSize being zero

  
Discussions (3)
Title Replies (including bot) Last reply
INFO: trying to register non-static key in uhid_char_release 1 (5) 2020/11/11 13:21
Re: INFO: trying to register non-static key in uhid_char_release 1 (1) 2020/03/21 19:17
Re: INFO: trying to register non-static key in uhid_char_release 1 (1) 2020/03/08 06:08
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: trying to register non-static key in uhid_char_release C done 3 1322d 1344d 1/1 fixed on 2020/09/28 22:53
linux-4.14 INFO: trying to register non-static key in uhid_char_release C done 2 1322d 1341d 1/1 fixed on 2020/09/28 23:05
Last patch testing requests (1)
Created Duration User Patch Repo Result
2020/09/22 00:58 17m brookebasile@gmail.com upstream OK
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2020/10/07 14:20 2h40m bisect fix upstream job log (1)
2020/06/10 16:39 25m (6) bisect fix upstream job log (0) log

Sample crash report:
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 6976 Comm: syz-executor397 Not tainted 5.9.0-rc2-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+0x1f0/0x31e lib/dump_stack.c:118
 register_lock_class+0xf06/0x1520 kernel/locking/lockdep.c:893
 __lock_acquire+0xfa/0x2ab0 kernel/locking/lockdep.c:4305
 lock_acquire+0x160/0x730 kernel/locking/lockdep.c:5005
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x9e/0xc0 kernel/locking/spinlock.c:159
 __wake_up_common_lock kernel/sched/wait.c:122 [inline]
 __wake_up+0xb8/0x150 kernel/sched/wait.c:142
 uhid_dev_destroy drivers/hid/uhid.c:563 [inline]
 uhid_char_release+0x99/0x600 drivers/hid/uhid.c:642
 __fput+0x34f/0x7b0 fs/file_table.c:281
 task_work_run+0x137/0x1c0 kernel/task_work.c:141
 exit_task_work include/linux/task_work.h:25 [inline]
 do_exit+0x5f3/0x1f20 kernel/exit.c:806
 do_group_exit+0x161/0x2d0 kernel/exit.c:903
 __do_sys_exit_group+0x13/0x20 kernel/exit.c:914
 __se_sys_exit_group+0x10/0x10 kernel/exit.c:912
 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:912
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x43ff88
Code: Bad RIP value.
RSP: 002b:00007ffe46e70b68 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
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 6976 Comm: syz-executor397 Not tainted 5.9.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__wake_up_common+0x2a7/0x4e0 kernel/sched/wait.c:86
Code: 00 00 45 31 f6 eb 15 66 90 66 2e 0f 1f 84 00 00 00 00 00 4d 39 fc 0f 84 e3 01 00 00 4c 89 fb 49 8d 6f e8 4c 89 f8 48 c1 e8 03 <80> 3c 10 00 74 12 48 89 df e8 1b ab 5d 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc900020a7c18 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff8880884813f8
RBP: ffffffffffffffe8 R08: 0000000000000000 R09: ffffc900020a7c88
R10: fffff52000414f84 R11: 0000000000000000 R12: ffff888088481438
R13: 1ffff92000414f91 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004c0968 CR3: 000000000948d000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __wake_up_common_lock kernel/sched/wait.c:123 [inline]
 __wake_up+0xd4/0x150 kernel/sched/wait.c:142
 uhid_dev_destroy drivers/hid/uhid.c:563 [inline]
 uhid_char_release+0x99/0x600 drivers/hid/uhid.c:642
 __fput+0x34f/0x7b0 fs/file_table.c:281
 task_work_run+0x137/0x1c0 kernel/task_work.c:141
 exit_task_work include/linux/task_work.h:25 [inline]
 do_exit+0x5f3/0x1f20 kernel/exit.c:806
 do_group_exit+0x161/0x2d0 kernel/exit.c:903
 __do_sys_exit_group+0x13/0x20 kernel/exit.c:914
 __se_sys_exit_group+0x10/0x10 kernel/exit.c:912
 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:912
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x43ff88
Code: Bad RIP value.
RSP: 002b:00007ffe46e70b68 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 1b2f5bd436a782e5 ]---
RIP: 0010:__wake_up_common+0x2a7/0x4e0 kernel/sched/wait.c:86
Code: 00 00 45 31 f6 eb 15 66 90 66 2e 0f 1f 84 00 00 00 00 00 4d 39 fc 0f 84 e3 01 00 00 4c 89 fb 49 8d 6f e8 4c 89 f8 48 c1 e8 03 <80> 3c 10 00 74 12 48 89 df e8 1b ab 5d 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc900020a7c18 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff8880884813f8
RBP: ffffffffffffffe8 R08: 0000000000000000 R09: ffffc900020a7c88
R10: fffff52000414f84 R11: 0000000000000000 R12: ffff888088481438
R13: 1ffff92000414f91 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004c0968 CR3: 000000000948d000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/08/30 23:09 upstream 1127b219ce94 d5a3ae1f .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/08/30 21:40 upstream 1127b219ce94 d5a3ae1f .config console log report syz C ci-upstream-kasan-gce-root
2020/08/30 16:29 upstream 1127b219ce94 d5a3ae1f .config console log report syz C ci-upstream-kasan-gce
2020/08/30 15:25 upstream 1127b219ce94 d5a3ae1f .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/08/16 10:15 upstream d84835b118ed 424dd8e7 .config console log report syz C ci-upstream-kasan-gce
2020/08/13 18:46 upstream fffe3ae0ee84 ee7cb8b6 .config console log report syz C ci-qemu-upstream
2020/08/11 01:52 upstream fc80c51fd4b2 7adc7b65 .config console log report syz C ci-upstream-kasan-gce-root
2020/08/09 16:01 upstream 06a81c1c7db9 70301872 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/08/09 01:10 upstream 449dc8c97089 f721e4a0 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/07/28 14:28 upstream 92ed30191993 cb93dc6a .config console log report syz C ci-qemu-upstream
2020/05/11 15:07 upstream 2ef96a5bb12b f8f57555 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/04/25 00:10 upstream b4f633221f0a 03d97a1b .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/04/16 14:40 upstream 00086336a8d9 c743fcb3 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/04/15 23:24 upstream 8632e9b5645b 3f3c5574 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/03/26 12:11 upstream 1b649e0bcae7 e8e6c7d2 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/03/22 14:25 upstream b74b991fb8b9 78267cec .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/03/09 15:26 upstream 2c523b344dfa 2e9971bb .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/08/30 08:15 upstream 1127b219ce94 d5a3ae1f .config console log report syz C ci-upstream-kasan-gce-386
2020/08/16 10:57 upstream 4b6c093e21d3 424dd8e7 .config console log report syz C ci-upstream-kasan-gce-386
2020/08/31 15:09 linux-next b36c969764ab d5a3ae1f .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/08/12 23:42 linux-next bc09acc9f224 bc15f7db .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/04/16 00:00 upstream 8632e9b5645b 3f3c5574 .config console log report syz ci-upstream-kasan-gce-smack-root
2020/04/08 17:42 upstream f5e94d10e4c4 db9bcd4b .config console log report syz ci-upstream-kasan-gce-smack-root
2020/03/07 18:00 upstream 63849c8f4107 2e9971bb .config console log report ci-upstream-kasan-gce-smack-root
2020/03/07 15:31 upstream 63849c8f4107 2e9971bb .config console log report ci-upstream-kasan-gce-smack-root
2020/03/07 01:55 upstream fb279f4e2386 fd2a5f28 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.