syzbot


WARNING: bad usercopy in hidraw_ioctl

Status: closed as dup on 2019/08/21 23:38
Subsystems: hardening mm
[Documentation on labels]
Reported-by: syzbot+fc7106c3bcd1cb7b165c@syzkaller.appspotmail.com
First crash: 1703d, last: 1687d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
BUG: bad usercopy in hidraw_ioctl hardening mm 5 1699d 1716d
Discussions (1)
Title Replies (including bot) Last reply
WARNING: bad usercopy in hidraw_ioctl 1 (2) 2019/08/21 23:38

Sample crash report:
------------[ cut here ]------------
Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'shmem_inode_cache' (offset 88, size 33)!
WARNING: CPU: 1 PID: 6380 at mm/usercopy.c:74 usercopy_warn+0xe8/0x110 mm/usercopy.c:74
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 6380 Comm: syz-executor.3 Not tainted 5.3.0-rc7+ #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
 panic+0x2a3/0x6da kernel/panic.c:219
 __warn.cold+0x20/0x4a kernel/panic.c:576
 report_bug+0x262/0x2a0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:179 [inline]
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 do_error_trap+0x12b/0x1e0 arch/x86/kernel/traps.c:272
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:291
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1028
RIP: 0010:usercopy_warn+0xe8/0x110 mm/usercopy.c:74
Code: e8 dd f4 d6 ff 49 89 e9 4c 89 e1 48 89 de 41 57 48 c7 c7 e0 f6 cd 85 41 55 41 56 4c 8b 44 24 20 48 8b 54 24 18 e8 fd d9 ac ff <0f> 0b 48 83 c4 18 e9 45 ff ff ff 48 c7 c5 e0 f4 cd 85 49 89 ee 49
RSP: 0018:ffff8881b10d7be8 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffffff85cdf6a0 RCX: 0000000000000000
RDX: 00000000000086aa RSI: ffffffff81288ddd RDI: ffffed103621af6f
RBP: ffffffff85cc2de0 R08: ffff8881d4e26000 R09: fffffbfff11ad7a2
R10: fffffbfff11ad7a1 R11: ffffffff88d6bd0f R12: ffffffff86a6be68
R13: 0000000000000058 R14: ffffffff85cdf520 R15: 0000000000000021
 check_heap_object mm/usercopy.c:234 [inline]
 __check_object_size mm/usercopy.c:280 [inline]
 __check_object_size+0x327/0x39a mm/usercopy.c:250
 check_object_size include/linux/thread_info.h:119 [inline]
 check_copy_size include/linux/thread_info.h:150 [inline]
 copy_to_user include/linux/uaccess.h:151 [inline]
 hidraw_ioctl+0x65f/0xae0 drivers/hid/hidraw.c:440
 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:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459879
Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f6430846c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459879
RDX: 00000000200004c0 RSI: 0000000080404804 RDI: 0000000000000004
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f64308476d4
R13: 00000000004c2229 R14: 00000000004d56c8 R15: 00000000ffffffff
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/06 12:31 https://github.com/google/kasan.git usb-fuzzer f0df5c1be1e9 c16be727 .config console log report ci2-upstream-usb
2019/09/06 08:58 https://github.com/google/kasan.git usb-fuzzer f0df5c1be1e9 c16be727 .config console log report ci2-upstream-usb
2019/09/01 22:35 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 bad3cce2 .config console log report ci2-upstream-usb
2019/08/31 11:18 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 bcd7bcc2 .config console log report ci2-upstream-usb
2019/08/30 06:35 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 cd626f3b .config console log report ci2-upstream-usb
2019/08/29 04:51 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 40203c15 .config console log report ci2-upstream-usb
2019/08/28 01:51 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 fd37b39e .config console log report ci2-upstream-usb
2019/08/24 01:36 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 78ded196 .config console log report ci2-upstream-usb
2019/08/21 21:28 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 4ea67ff8 .config console log report ci2-upstream-usb
2019/08/20 22:35 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 6b8391d0 .config console log report ci2-upstream-usb
* Struck through repros no longer work on HEAD.