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: 798d, last: 744d

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
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: 0 PID: 9392 Comm: syz-executor302 Not tainted 5.6.0-rc6-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:880 [inline]
 register_lock_class+0x14c4/0x1540 kernel/locking/lockdep.c:1189
 __lock_acquire+0xfc/0x3ca0 kernel/locking/lockdep.c:3836
 lock_acquire+0x197/0x420 kernel/locking/lockdep.c:4484
 __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+0x31b/0x6c0 drivers/hid/uhid.c:669
 do_loop_readv_writev fs/read_write.c:714 [inline]
 do_loop_readv_writev fs/read_write.c:701 [inline]
 do_iter_read+0x47f/0x650 fs/read_write.c:935
 vfs_readv+0xf0/0x160 fs/read_write.c:1053
 do_readv+0x279/0x2f0 fs/read_write.c:1090
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
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:00007f0082936da8 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 ffffc90002197bc0, but was 0000000000000000
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:51!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9392 Comm: syz-executor302 Not tainted 5.6.0-rc6-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 44 93 c9 fd 0f 0b 48 89 f1 48 c7 c7 c0 e6 51 88 4c 89 e6 e8 30 93 c9 fd 0f 0b 48 89 ee 48 c7 c7 60 e8 51 88 e8 1f 93 c9 fd <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 a0 e7 51 88 e8 0b 93 c9 fd 0f 0b
RSP: 0018:ffffc90002197a60 EFLAGS: 00010082
RAX: 0000000000000054 RBX: ffffc90002197ba8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815c06c1 RDI: fffff52000432f3e
RBP: ffffc90002197bc0 R08: 0000000000000054 R09: ffffed1015cc45c9
R10: ffffed1015cc45c8 R11: ffff8880ae622e43 R12: ffff88808d4e11f8
R13: ffff88808d4e11f8 R14: 0000000000000286 R15: ffffc90002197bc0
FS:  00007f0082937700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc99cd1c000 CR3: 000000009f435000 CR4: 00000000001406f0
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+0x31b/0x6c0 drivers/hid/uhid.c:669
 do_loop_readv_writev fs/read_write.c:714 [inline]
 do_loop_readv_writev fs/read_write.c:701 [inline]
 do_iter_read+0x47f/0x650 fs/read_write.c:935
 vfs_readv+0xf0/0x160 fs/read_write.c:1053
 do_readv+0x279/0x2f0 fs/read_write.c:1090
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
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:00007f0082936da8 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 d2f12cae324b95c6 ]---
RIP: 0010:__list_del_entry_valid.cold+0xf/0x55 lib/list_debug.c:51
Code: e8 44 93 c9 fd 0f 0b 48 89 f1 48 c7 c7 c0 e6 51 88 4c 89 e6 e8 30 93 c9 fd 0f 0b 48 89 ee 48 c7 c7 60 e8 51 88 e8 1f 93 c9 fd <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 a0 e7 51 88 e8 0b 93 c9 fd 0f 0b
RSP: 0018:ffffc90002197a60 EFLAGS: 00010082
RAX: 0000000000000054 RBX: ffffc90002197ba8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815c06c1 RDI: fffff52000432f3e
RBP: ffffc90002197bc0 R08: 0000000000000054 R09: ffffed1015cc45c9
R10: ffffed1015cc45c8 R11: ffff8880ae622e43 R12: ffff88808d4e11f8
R13: ffff88808d4e11f8 R14: 0000000000000286 R15: ffffc90002197bc0
FS:  00007f0082937700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc99cd1c000 CR3: 000000009f435000 CR4: 00000000001406f0
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-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
ci-upstream-linux-next-kasan-gce-root 2020/04/12 04:03 linux-next 11ecafc691e1 a8c6a3f8 .config log report syz C