syzbot


BUG: bad usercopy in __check_heap_object

Status: closed as invalid on 2018/04/10 15:15
Subsystems: hardening mm
[Documentation on labels]
Reported-by: syzbot+b390e39b8a5a405ea26f@syzkaller.appspotmail.com
First crash: 2217d, last: 2210d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: bad usercopy in __check_heap_object (3) hardening mm C 287 2048d 2119d 12/26 fixed on 2019/06/11 10:01
upstream BUG: bad usercopy in __check_heap_object (2) mm hardening 1 2200d 2200d 0/26 closed as invalid on 2018/05/26 17:45

Sample crash report:
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
usercopy: Kernel memory overwrite attempt detected to SLAB object 'names_cache' (offset 860, size 4068)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:100!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 4491 Comm: syz-executor3 Not tainted 4.16.0-rc7+ #283
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:usercopy_abort+0xae/0xd0 mm/usercopy.c:88
RSP: 0018:ffff88018b29fa68 EFLAGS: 00010282
RAX: 0000000000000068 RBX: ffffffff880b3e14 RCX: 0000000000000000
RDX: 0000000000000068 RSI: 1ffff10031653f02 RDI: ffffed0031653f41
RBP: ffff88018b29fac0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000002f6 R11: 0000000000000000 R12: ffffffff87520200
R13: ffffffff875234a0 R14: 000000000000035c R15: 0000000000000fe4
FS:  0000000000000000(0000) GS:ffff8801db100000(0063) knlGS:0000000008ec4900
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000081165e4 CR3: 000000018b616001 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __check_heap_object+0xb5/0xc0 mm/slab.c:4431
 check_heap_object mm/usercopy.c:236 [inline]
 __check_object_size+0x272/0x530 mm/usercopy.c:259
 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 fs/namei.c:209 [inline]
 user_path_create fs/namei.c:3683 [inline]
 SYSC_mkdirat fs/namei.c:3815 [inline]
 SyS_mkdirat fs/namei.c:3807 [inline]
 SYSC_mkdir fs/namei.c:3834 [inline]
 SyS_mkdir+0xc1/0x2a0 fs/namei.c:3832
 do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline]
 do_fast_syscall_32+0x3ec/0xf9f arch/x86/entry/common.c:392
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7fdfc99
RSP: 002b:000000000844eacc EFLAGS: 00000206 ORIG_RAX: 0000000000000027
RAX: ffffffffffffffda RBX: 000000000844f7ac RCX: 00000000000001ff
RDX: 000000000844f188 RSI: 0000000000000013 RDI: 000000000844f7ac
RBP: 0000000000000502 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Code: e8 b8 9e c1 ff 48 8b 45 c0 4c 8b 45 c8 4d 89 e9 48 8b 55 d0 41 57 48 89 d9 41 56 4c 89 e6 48 c7 c7 a0 03 52 87 50 e8 ca 44 ab ff <0f> 0b 49 c7 c5 40 01 52 87 4c 89 e8 4d 89 e8 e9 76 ff ff ff 0f 
RIP: usercopy_abort+0xae/0xd0 mm/usercopy.c:88 RSP: ffff88018b29fa68
---[ end trace b762979141f66309 ]---
Kernel panic - not syncing: Fatal exception
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/31 12:54 upstream b5dbc28762fd 8fbce0e4 .config console log report ci-upstream-kasan-gce-386
2018/04/06 10:35 net-next-old 17dec0a94915 4f1152d4 .config console log report ci-upstream-net-kasan-gce
2018/03/30 22:20 net-next-old 6f14f49ce5eb 8fbce0e4 .config console log report ci-upstream-net-kasan-gce
2018/03/30 22:00 net-next-old 6f14f49ce5eb 8fbce0e4 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.