syzbot


BUG: bad usercopy in strncpy_from_user

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

Sample crash report:
usercopy: kernel memory overwrite attempt detected to 00000000764fef29 (names_cache) (4068 bytes)
------------[ 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: 0 PID: 3369 Comm: syz-executor2 Not tainted 4.15.0-rc5+ #238
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:ffff8801ac43fc30 EFLAGS: 00010286
RAX: 0000000000000061 RBX: ffffffff85328380 RCX: 0000000000000000
RDX: 0000000000000061 RSI: 1ffff10035887f46 RDI: ffffed0035887f7a
RBP: ffff8801ac43fd20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff85328340
R13: ffff8801bf00175c R14: 0000000000000fe4 R15: ffffea0006fc0000
FS:  0000000000dd3940(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020fa7f12 CR3: 00000001ab72c001 CR4: 00000000001606f0
Call Trace:
 check_object_size include/linux/thread_info.h:112 [inline]
 strncpy_from_user+0xf4/0x430 lib/strncpy_from_user.c:116
 getname_flags+0x10e/0x580 fs/namei.c:149
 getname+0x19/0x20 fs/namei.c:209
 do_sys_open+0x2e7/0x6d0 fs/open.c:1053
 SYSC_open fs/open.c:1077 [inline]
 SyS_open+0x2d/0x40 fs/open.c:1072
 entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x450c70
RSP: 002b:0000000000a2e8b0 EFLAGS: 00000202 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 0000000000dd3914 RCX: 0000000000450c70
RDX: 00000000000004ba RSI: 0000000000090800 RDI: 0000000000a2fa50
RBP: 0000000000a2fa50 R08: 0000000000000001 R09: 0000000000dd3940
R10: 0000000000000000 R11: 0000000000000202 R12: 00000000000004ba
R13: 0000000000000000 R14: 0000000000021cda R15: 0000000000000010
Code: 48 0f 44 da e8 c0 79 c2 ff 48 8b 85 28 ff ff ff 4d 89 f1 4c 89 e9 4c 89 e2 48 89 de 48 c7 c7 40 84 32 85 49 89 c0 e8 a6 35 ac ff <0f> 0b 48 c7 c0 00 82 32 85 eb 96 48 c7 c0 40 82 32 85 eb 8d 48 
RIP: report_usercopy mm/usercopy.c:64 [inline] RSP: ffff8801ac43fc30
RIP: __check_object_size+0x3a2/0x4f0 mm/usercopy.c:264 RSP: ffff8801ac43fc30
---[ end trace b911647a6d5c1d71 ]---
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
2017/12/27 11:31 upstream beacbc68ac3e 09c8f4c0 .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.