syzbot


BUG: spinlock already unlocked in input_set_keycode

Status: fixed on 2020/02/18 14:31
Subsystems: input
[Documentation on labels]
Reported-by: syzbot+c769968809f9359b07aa@syzkaller.appspotmail.com
Fix commit: cb222aed03d7 Input: add safety guards to input_set_keycode()
First crash: 1854d, last: 1854d
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 3.16 000/245] 3.16.83-rc1 review 260 (260) 2020/04/24 17:54
[PATCH 5.4 00/78] 5.4.12-stable review 107 (107) 2020/02/11 15:01
[PATCH 4.19 00/46] 4.19.96-stable review 51 (51) 2020/01/15 02:09
[PATCH 4.14 00/39] 4.14.165-stable review 44 (44) 2020/01/15 02:08
[PATCH 4.9 00/31] 4.9.210-stable review 36 (36) 2020/01/15 02:08
[PATCH 4.4 00/28] 4.4.210-stable review 33 (33) 2020/01/15 02:08
[PATCH] Input: add safety guards to input_set_keycode() 1 (1) 2019/12/07 21:27
Reminder: 45 active syzbot reports in usb subsystem 1 (1) 2019/11/19 04:27
BUG: spinlock already unlocked in input_set_keycode 0 (1) 2019/11/18 16:15

Sample crash report:
BUG: spinlock already unlocked on CPU#0, syz-executor217/1716
 lock: 0xffff8881cfeb5210, .magic: dead4ead, .owner: syz-executor217/1716, .owner_cpu: 0
CPU: 0 PID: 1716 Comm: syz-executor217 Not tainted 5.4.0-rc6+ #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+0xca/0x13e lib/dump_stack.c:113
 spin_bug kernel/locking/spinlock_debug.c:75 [inline]
 debug_spin_unlock kernel/locking/spinlock_debug.c:98 [inline]
 do_raw_spin_unlock+0x163/0x220 kernel/locking/spinlock_debug.c:138
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:159 [inline]
 _raw_spin_unlock_irqrestore+0x23/0x50 kernel/locking/spinlock.c:191
 spin_unlock_irqrestore include/linux/spinlock.h:393 [inline]
 input_set_keycode+0x125/0x320 drivers/input/input.c:958
 evdev_handle_set_keycode_v2+0xc4/0x120 drivers/input/evdev.c:882
 evdev_do_ioctl drivers/input/evdev.c:1150 [inline]
 evdev_ioctl_handler+0xd49/0x19f0 drivers/input/evdev.c:1284
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0xd2d/0x1330 fs/ioctl.c:696
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:718
 do_syscall_64+0xb7/0x580 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x444ca9
Code: e8 bc af 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 1b d8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc61f97448 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000444ca9
RDX: 0000000020000140 RSI: 0000000040284504 RDI: 0000000000000004
RBP: 00000000006cf018 R08: 090b000000008300 R09: 00000000004002e0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000402950
R13: 00000000004029e0 R14: 0000000000000000 R15: 0000000000000000
------------[ cut here ]------------
pvqspinlock: lock 0xffff8881cfeb5210 has corrupted value 0x0!
WARNING: CPU: 0 PID: 1716 at kernel/locking/qspinlock_paravirt.h:498 __pv_queued_spin_unlock_slowpath+0x1c0/0x220 kernel/locking/qspinlock_paravirt.h:498

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/16 21:36 https://github.com/google/kasan.git usb-fuzzer 46178223c0ca cdac920b .config console log report syz C ci2-upstream-usb
2019/11/16 21:02 https://github.com/google/kasan.git usb-fuzzer 46178223c0ca cdac920b .config console log report ci2-upstream-usb
* Struck through repros no longer work on HEAD.