syzbot


BUG: GPF in non-whitelisted uaccess (non-canonical address?)

Status: fixed on 2018/12/07 08:24
Subsystems: input
[Documentation on labels]
Reported-by: syzbot+72473edc9bf4eb1c6556@syzkaller.appspotmail.com
Fix commit: 8c01db7619f0 HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges
First crash: 2223d, last: 2215d
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 4.4 00/70] 4.4.165-stable review 81 (81) 2020/12/06 09:46
[PATCH 3.16 000/305] 3.16.63-rc1 review 313 (313) 2019/06/07 15:34
[PATCH 4.14 00/62] 4.14.84-stable review 80 (80) 2018/11/29 08:08
[PATCH 4.19 000/118] 4.19.5-stable review 129 (129) 2018/11/27 14:38
[PATCH 4.9 00/46] 4.9.141-stable review 52 (52) 2018/11/27 13:04
[PATCH 3.18 00/24] 3.18.127-stable review 30 (30) 2018/11/27 10:01
[PATCH] HID: uhid: prevent uhid_char_write() under KERNEL_DS 20 (20) 2018/11/19 13:26
BUG: GPF in non-whitelisted uaccess (non-canonical address?) 3 (5) 2018/11/14 17:14
[PATCH] HID: uhid: prevent splice(2) 1 (1) 2018/11/14 13:07

Sample crash report:
BUG: GPF in non-whitelisted uaccess (non-canonical address?)
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5962 Comm: syz-executor203 Not tainted 4.20.0-rc2+ #111
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:180
Code: 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 1f 00 c3 0f 1f 80 00 00 00 00 0f 1f 00 83 fa 40 0f 82 70 ff ff ff 89 d1 <f3> a4 31 c0 0f 1f 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 83
RSP: 0018:ffff8881c0a57398 EFLAGS: 00010206
RAX: 0000000000000000 RBX: 0000000000000109 RCX: 0000000000000109
RDX: 0000000000000109 RSI: 241037f828e5769d RDI: ffff8881c07b06f8
RBP: ffff8881c0a573d0 R08: ffffed10380f6101 R09: ffffed10380f6101
R10: ffffed10380f6100 R11: ffff8881c07b0800 R12: 241037f828e577a6
R13: 241037f828e5769d R14: ffff8881c07b06f8 R15: ffffffffffffffff
FS:  00000000009d3880(0000) GS:ffff8881dae00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020d83ff8 CR3: 00000001b37fe000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 copy_from_user include/linux/uaccess.h:147 [inline]
 uhid_dev_create+0x20c/0xb40 drivers/hid/uhid.c:542
 uhid_char_write+0xc74/0xef0 drivers/hid/uhid.c:725
 __vfs_write+0x119/0x9f0 fs/read_write.c:485
 __kernel_write+0x10c/0x370 fs/read_write.c:506
 write_pipe_buf+0x180/0x240 fs/splice.c:797
 splice_from_pipe_feed fs/splice.c:503 [inline]
 __splice_from_pipe+0x38b/0x7c0 fs/splice.c:627
 splice_from_pipe+0x1ec/0x340 fs/splice.c:662
 default_file_splice_write+0x3c/0x90 fs/splice.c:809
 do_splice_from fs/splice.c:851 [inline]
 direct_splice_actor+0x128/0x190 fs/splice.c:1018
 splice_direct_to_actor+0x318/0x8f0 fs/splice.c:973
 do_splice_direct+0x2d4/0x420 fs/splice.c:1061
 do_sendfile+0x62a/0xe20 fs/read_write.c:1439
 __do_sys_sendfile64 fs/read_write.c:1494 [inline]
 __se_sys_sendfile64 fs/read_write.c:1486 [inline]
 __x64_sys_sendfile64+0x15d/0x250 fs/read_write.c:1486
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440309
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff7d3d0028 EFLAGS: 00000203 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440309
RDX: 0000000020d83ff8 RSI: 0000000000000004 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00008000fffffffe R11: 0000000000000203 R12: 0000000000401b90
R13: 0000000000401c20 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace e9266989ab8be374 ]---
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:180
Code: 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 1f 00 c3 0f 1f 80 00 00 00 00 0f 1f 00 83 fa 40 0f 82 70 ff ff ff 89 d1 <f3> a4 31 c0 0f 1f 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 83
RSP: 0018:ffff8881c0a57398 EFLAGS: 00010206
RAX: 0000000000000000 RBX: 0000000000000109 RCX: 0000000000000109
RDX: 0000000000000109 RSI: 241037f828e5769d RDI: ffff8881c07b06f8
RBP: ffff8881c0a573d0 R08: ffffed10380f6101 R09: ffffed10380f6101
R10: ffffed10380f6100 R11: ffff8881c07b0800 R12: 241037f828e577a6
R13: 241037f828e5769d R14: ffff8881c07b06f8 R15: ffffffffffffffff
FS:  00000000009d3880(0000) GS:ffff8881dae00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020d83ff8 CR3: 00000001b37fe000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/14 07:34 upstream ccda4af0f4b9 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-smack-root
2018/11/14 03:44 upstream ccda4af0f4b9 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-root
2018/11/14 00:53 upstream ccda4af0f4b9 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce
2018/11/14 00:24 upstream ccda4af0f4b9 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/11/14 09:07 linux-next 442b8cea2477 5f5f6d14 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/18 15:47 upstream 1ce80e0fe98e adf636a8 .config console log report ci-upstream-kasan-gce-selinux-root
2018/11/16 13:16 upstream da5322e65940 f5e275d1 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/13 23:19 upstream ccda4af0f4b9 5f5f6d14 .config console log report ci-upstream-kasan-gce-selinux-root
2018/11/11 08:10 upstream ab6e1f378f54 f3c4e618 .config console log report ci-upstream-kasan-gce-selinux-root
2018/11/11 08:08 upstream ab6e1f378f54 f3c4e618 .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.