syzbot


BUG: bad usercopy in do_syslog

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

Sample crash report:
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:84!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 2995 Comm: rsyslogd Not tainted 4.15.0-rc4-mm1+ #49
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:report_usercopy mm/usercopy.c:76 [inline]
RIP: 0010:__check_object_size+0x3a2/0x4f0 mm/usercopy.c:276
RSP: 0018:ffff8801cff57a80 EFLAGS: 00010286
RAX: 0000000000000063 RBX: ffffffff85929820 RCX: 0000000000000000
RDX: 0000000000000063 RSI: 1ffff10039feaf10 RDI: ffffed0039feaf44
RBP: ffff8801cff57b70 R08: 1ffff10039feaed2 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff859297e0
R13: ffff8801dae14090 R14: 00000000000003f0 R15: ffffea00076b8500
FS:  00007f722df8f700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000024d3cd8 CR3: 00000001d0f97004 CR4: 00000000001626e0
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_to_user include/linux/uaccess.h:154 [inline]
 syslog_print kernel/printk/printk.c:1332 [inline]
 do_syslog+0x867/0xb80 kernel/printk/printk.c:1455
 kmsg_read+0x74/0xa0 fs/proc/kmsg.c:40
 proc_reg_read+0xe8/0x160 fs/proc/inode.c:217
 __vfs_read+0xef/0xa00 fs/read_write.c:411
 vfs_read+0x11e/0x350 fs/read_write.c:447
 SYSC_read fs/read_write.c:573 [inline]
 SyS_read+0xef/0x220 fs/read_write.c:566
 entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x7f72309ef1fd
RSP: 002b:00007f722df8ee30 EFLAGS: 00000293 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f72309ef1fd
RDX: 0000000000000fff RSI: 00007f722f7c35a0 RDI: 0000000000000004
RBP: 0000000000000030 R08: 000000000220d260 R09: 0000000000000000
R10: 20303034313d6570 R11: 0000000000000293 R12: 00000000000001c8
R13: 0000000000000008 R14: 00007f722f7c35a4 R15: 00007f722f7c45a4
Code: 48 0f 44 da e8 80 76 c1 ff 48 8b 85 28 ff ff ff 4d 89 f1 4c 89 e9 4c 89 e2 48 89 de 48 c7 c7 60 98 92 85 49 89 c0 e8 86 2f ab ff <0f> 0b 48 c7 c0 20 96 92 85 eb 96 48 c7 c0 60 96 92 85 eb 8d 48 
RIP: report_usercopy mm/usercopy.c:76 [inline] RSP: ffff8801cff57a80
RIP: __check_object_size+0x3a2/0x4f0 mm/usercopy.c:276 RSP: ffff8801cff57a80
---[ end trace 0c9a71f99d737cbb ]---
Kernel panic - not syncing: Fatal exception
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/01 18:07 mmots 37759fa6d0fa 00193447 .config console log report ci-upstream-mmots-kasan-gce
* Struck through repros no longer work on HEAD.