syzbot


INFO: trying to register non-static key in prepare_to_wait_event

Status: upstream: reported C repro on 2020/03/19 17:27
Reported-by: syzbot+08c9aea900cea24d398d@syzkaller.appspotmail.com
First crash: 928d, last: 874d

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 prepare_to_wait_event (log)
Repro: C syz .config

Fix bisection: failed (bisect log)
Patch testing requests:
Created Duration User Patch Repo Result
2022/09/15 01:29 10m linux-next report log
2022/09/09 12:27 16m upstream OK log
2022/09/06 00:27 16m upstream OK log
2020/09/22 06:05 17m brookebasile@gmail.com upstream OK

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: 7202 Comm: syz-executor152 Not tainted 5.6.0-next-20200411-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:913 [inline]
 register_lock_class+0x1664/0x1760 kernel/locking/lockdep.c:1225
 __lock_acquire+0x104/0x4c50 kernel/locking/lockdep.c:4234
 lock_acquire+0x1f2/0x8f0 kernel/locking/lockdep.c:4934
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x8c/0xbf kernel/locking/spinlock.c:159
 prepare_to_wait_event+0x5b/0x650 kernel/sched/wait.c:280
 uhid_char_read+0x321/0x6c0 drivers/hid/uhid.c:669
 do_loop_readv_writev fs/read_write.c:715 [inline]
 do_loop_readv_writev fs/read_write.c:702 [inline]
 do_iter_read+0x483/0x650 fs/read_write.c:936
 vfs_readv+0xf0/0x160 fs/read_write.c:1054
 do_readv+0x27f/0x300 fs/read_write.c:1091
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x4458d9
Code: e8 bc b7 02 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 2b 12 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fd20c24bda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000013
RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 00000000004458d9
RDX: 0000000000000002 RSI: 0000000020001680 RDI: 0000000000000003
RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac2c
R13: 0000000020000b40 R14: 00000000004adda8 R15: 20c49ba5e353f7cf
list_del corruption. prev->next should be ffffc90001817bc0, but was 0000000000000000
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:51!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 7202 Comm: syz-executor152 Not tainted 5.6.0-next-20200411-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_del_entry_valid.cold+0xf/0x55 lib/list_debug.c:51
Code: e8 34 5c c2 fd 0f 0b 48 89 f1 48 c7 c7 00 a9 72 88 4c 89 e6 e8 20 5c c2 fd 0f 0b 48 89 ee 48 c7 c7 a0 aa 72 88 e8 0f 5c c2 fd <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 e0 a9 72 88 e8 fb 5b c2 fd 0f 0b
RSP: 0018:ffffc90001817a60 EFLAGS: 00010082
RAX: 0000000000000054 RBX: ffffc90001817ba8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ce321 RDI: fffff52000302f3e
RBP: ffffc90001817bc0 R08: 0000000000000054 R09: ffffed1015ce45f1
R10: ffff8880ae722f83 R11: ffffed1015ce45f0 R12: ffff888094741210
R13: ffff888094741210 R14: 0000000000000286 R15: ffffc90001817bc0
FS:  00007fd20c24c700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555c78686c20 CR3: 00000000a30be000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_del_entry include/linux/list.h:132 [inline]
 list_del_init include/linux/list.h:204 [inline]
 prepare_to_wait_event+0x19c/0x650 kernel/sched/wait.c:294
 uhid_char_read+0x321/0x6c0 drivers/hid/uhid.c:669
 do_loop_readv_writev fs/read_write.c:715 [inline]
 do_loop_readv_writev fs/read_write.c:702 [inline]
 do_iter_read+0x483/0x650 fs/read_write.c:936
 vfs_readv+0xf0/0x160 fs/read_write.c:1054
 do_readv+0x27f/0x300 fs/read_write.c:1091
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x4458d9
Code: e8 bc b7 02 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 2b 12 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fd20c24bda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000013
RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 00000000004458d9
RDX: 0000000000000002 RSI: 0000000020001680 RDI: 0000000000000003
RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac2c
R13: 0000000020000b40 R14: 00000000004adda8 R15: 20c49ba5e353f7cf
Modules linked in:
---[ end trace e7d42539b3cc4294 ]---
RIP: 0010:__list_del_entry_valid.cold+0xf/0x55 lib/list_debug.c:51
Code: e8 34 5c c2 fd 0f 0b 48 89 f1 48 c7 c7 00 a9 72 88 4c 89 e6 e8 20 5c c2 fd 0f 0b 48 89 ee 48 c7 c7 a0 aa 72 88 e8 0f 5c c2 fd <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 e0 a9 72 88 e8 fb 5b c2 fd 0f 0b
RSP: 0018:ffffc90001817a60 EFLAGS: 00010082
RAX: 0000000000000054 RBX: ffffc90001817ba8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ce321 RDI: fffff52000302f3e
RBP: ffffc90001817bc0 R08: 0000000000000054 R09: ffffed1015ce45f1
R10: ffff8880ae722f83 R11: ffffed1015ce45f0 R12: ffff888094741210
R13: ffff888094741210 R14: 0000000000000286 R15: ffffc90001817bc0
FS:  00007fd20c24c700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555c78686c20 CR3: 00000000a30be000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2020/04/12 04:03 linux-next 11ecafc691e1 a8c6a3f8 .config log report syz C
ci-upstream-kasan-gce 2020/03/19 05:34 upstream 5076190daded 0a96a13c .config log report syz C
ci-upstream-kasan-gce-386 2020/03/19 06:57 upstream 5076190daded 0a96a13c .config log report syz C
* Struck through repros no longer work on HEAD.