syzbot


BUG: bad usercopy in getname_flags

Status: auto-closed as invalid on 2020/12/09 18:23
Subsystems: hardening mm
[Documentation on labels]
Reported-by: syzbot+15621e0b23c02bc7e748@syzkaller.appspotmail.com
First crash: 1317d, last: 1317d

Sample crash report:
usercopy: Kernel memory overwrite attempt detected to SLAB object 'names_cache' (offset 2256, size 4064)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 7198 Comm: syz-executor.5 Not tainted 5.9.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:usercopy_abort+0xb9/0xbb mm/usercopy.c:99
Code: e8 f8 34 b7 ff 49 89 d9 4d 89 e8 4c 89 e1 41 56 48 89 ee 48 c7 c7 60 f6 56 88 ff 74 24 08 41 57 48 8b 54 24 20 e8 f2 8e a0 ff <0f> 0b e8 cc 34 b7 ff e8 d7 31 f7 ff 4c 89 e1 49 89 d8 44 89 ea 4c
RSP: 0018:ffffc9000730fc78 EFLAGS: 00010282
RAX: 0000000000000069 RBX: ffffffff88575a80 RCX: 0000000000000000
RDX: ffff88808e70c200 RSI: ffffffff815db9a7 RDI: fffff52000e61f81
RBP: ffffffff8856f4c0 R08: 0000000000000069 R09: ffff8880ae6318e7
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff896bfabc
R13: ffffffff8856f400 R14: 0000000000000fe0 R15: ffffffff8856f3c0
FS:  0000000001af1940(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000016a3b73 CR3: 000000008e8bd000 CR4: 00000000001526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __check_heap_object+0xad/0xad mm/slab.c:4173
 check_heap_object mm/usercopy.c:240 [inline]
 __check_object_size mm/usercopy.c:286 [inline]
 __check_object_size+0x32f/0x3e4 mm/usercopy.c:256
 check_object_size include/linux/thread_info.h:119 [inline]
 strncpy_from_user+0xaf/0x3e0 lib/strncpy_from_user.c:119
 getname_flags.part.0+0x95/0x4f0 fs/namei.c:149
 getname_flags include/linux/audit.h:320 [inline]
 getname+0x8e/0xd0 fs/namei.c:209
 do_sys_openat2+0xf5/0x420 fs/open.c:1162
 do_sys_open fs/open.c:1184 [inline]
 __do_sys_open fs/open.c:1192 [inline]
 __se_sys_open fs/open.c:1188 [inline]
 __x64_sys_open+0x119/0x1c0 fs/open.c:1188
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x417101
Code: 75 14 b8 02 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 19 00 00 c3 48 83 ec 08 e8 0a fa ff ff 48 89 04 24 b8 02 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fa ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:000000000169fda0 EFLAGS: 00000293 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 0000000000282be3 RCX: 0000000000417101
RDX: 000000000169fe3a RSI: 0000000000000002 RDI: 000000000169fe30
RBP: 00000000000016aa R08: 0000000000000000 R09: 000000000000000a
R10: 0000000000000075 R11: 0000000000000293 R12: 0000000000000000
R13: 000000000169fde0 R14: 0000000000282be3 R15: 000000000169fdf0
Modules linked in:
---[ end trace c30516bd22e9b18a ]---
RIP: 0010:usercopy_abort+0xb9/0xbb mm/usercopy.c:99
Code: e8 f8 34 b7 ff 49 89 d9 4d 89 e8 4c 89 e1 41 56 48 89 ee 48 c7 c7 60 f6 56 88 ff 74 24 08 41 57 48 8b 54 24 20 e8 f2 8e a0 ff <0f> 0b e8 cc 34 b7 ff e8 d7 31 f7 ff 4c 89 e1 49 89 d8 44 89 ea 4c
RSP: 0018:ffffc9000730fc78 EFLAGS: 00010282
RAX: 0000000000000069 RBX: ffffffff88575a80 RCX: 0000000000000000
RDX: ffff88808e70c200 RSI: ffffffff815db9a7 RDI: fffff52000e61f81
RBP: ffffffff8856f4c0 R08: 0000000000000069 R09: ffff8880ae6318e7
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff896bfabc
R13: ffffffff8856f400 R14: 0000000000000fe0 R15: ffffffff8856f3c0
FS:  0000000001af1940(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001590000 CR3: 000000008e8bd000 CR4: 00000000001526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/10 18:22 upstream 7fe10096c150 409809d8 .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.