syzbot


BUG: bad usercopy in rw_copy_check_uvector

Status: fixed on 2018/01/11 01:23
Subsystems: hardening mm
[Documentation on labels]
Reported-by: syzbot+d0e002e9fe9d630ea13a3aec7f1cac436c37b594@syzkaller.appspotmail.com
Fix commit: d76c68109f37 crypto: pcrypt - fix freeing pcrypt instances
First crash: 2319d, last: 2299d

Sample crash report:
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:72!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 10937 Comm: syz-executor6 Not tainted 4.15.0-rc5+ #177
netlink: 11 bytes leftover after parsing attributes in process `syz-executor6'.
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:report_usercopy mm/usercopy.c:64 [inline]
RIP: 0010:__check_object_size+0x3a2/0x4f0 mm/usercopy.c:264
RSP: 0018:ffff880105d4fa80 EFLAGS: 00010286
RAX: 0000000000000061 RBX: ffffffff8592bb60 RCX: 0000000000000000
RDX: 0000000000000061 RSI: ffffc90004140000 RDI: ffffed0020ba9f44
RBP: ffff880105d4fb70 R08: 0000000000000000 R09: 0000000000000000
R10: 000000007a58077b R11: 0000000000000000 R12: ffffffff8592bb20
R13: ffff8801c7280050 R14: 00000000000003e0 R15: ffffea00071ca000
FS:  00007f27470eb700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000562f0c264040 CR3: 00000001c7bd4003 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 check_object_size include/linux/thread_info.h:112 [inline]
 check_copy_size include/linux/thread_info.h:143 [inline]
 copy_from_user include/linux/uaccess.h:146 [inline]
 rw_copy_check_uvector+0x73/0x280 fs/read_write.c:760
 import_iovec+0xc8/0x430 lib/iov_iter.c:1398
 vfs_writev+0xfe/0x340 fs/read_write.c:974
 do_writev+0xfc/0x2a0 fs/read_write.c:1012
 SYSC_writev fs/read_write.c:1085 [inline]
 SyS_writev+0x27/0x30 fs/read_write.c:1082
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x452ac9
RSP: 002b:00007f27470eac58 EFLAGS: 00000212 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007f27470eb700 RCX: 0000000000452ac9
RDX: 000000000000003e RSI: 0000000020ac6000 RDI: 0000000000000013
RBP: 0000000000a2f870 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000
R13: 0000000000a2f7ef R14: 00007f27470eb9c0 R15: 0000000000000006
Code: 48 0f 44 da e8 70 5b c0 ff 48 8b 85 28 ff ff ff 4d 89 f1 4c 89 e9 4c 89 e2 48 89 de 48 c7 c7 20 bc 92 85 49 89 c0 e8 e6 10 aa ff <0f> 0b 48 c7 c0 e0 b9 92 85 eb 96 48 c7 c0 20 ba 92 85 eb 8d 48 
RIP: report_usercopy mm/usercopy.c:64 [inline] RSP: ffff880105d4fa80
RIP: __check_object_size+0x3a2/0x4f0 mm/usercopy.c:264 RSP: ffff880105d4fa80
---[ end trace 63d35f3db1ce9be7 ]---
Kernel panic - not syncing: Fatal exception
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/07 11:05 net-next-old d0adb51edb73 19c05fff .config console log report ci-upstream-net-kasan-gce
2018/01/07 08:12 net-next-old d0adb51edb73 19c05fff .config console log report ci-upstream-net-kasan-gce
2018/01/06 08:31 net-next-old d0adb51edb73 00193447 .config console log report ci-upstream-net-kasan-gce
2018/01/01 20:51 net-next-old 6bb8824732f6 00193447 .config console log report ci-upstream-net-kasan-gce
2017/12/21 18:06 net-next-old 8f36e0006543 eaadba98 .config console log report ci-upstream-net-kasan-gce
2017/12/18 23:33 net-next-old e7655085973b 1c4160ef .config console log report ci-upstream-net-kasan-gce
2017/12/19 22:19 linux-next 6084b576dca2 af9163c7 .config console log report ci-upstream-next-kasan-gce
* Struck through repros no longer work on HEAD.