syzbot


general protection fault in strcmp

Status: fixed on 2017/12/21 04:38
Subsystems: crypto keyrings
[Documentation on labels]
Reported-by: syzbot+25a1a3685abe943a89512250aece10bdd9aa4827@syzkaller.appspotmail.com
Fix commit: 18026d866801 KEYS: reject NULL restriction string when type is specified
First crash: 2339d, last: 2339d

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 9245 Comm: syz-executor4 Not tainted 4.15.0-rc1+ #200
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: 00000000b39f3d07 task.stack: 000000009c61786b
RIP: 0010:strcmp+0x5a/0xb0 lib/string.c:328
RSP: 0018:ffff8801913e7d18 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000062 RCX: ffffffff823b0528
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff853eb000
RBP: ffff8801913e7d40 R08: 0000000000000000 R09: 0000000000000005
R10: 0000000000000000 R11: ffffffff87489d60 R12: ffffffff853eb001
R13: 0000000000000001 R14: dffffc0000000000 R15: ffffffff823b04b0
FS:  00007f38862b5700(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020006000 CR3: 00000001d274e000 CR4: 00000000001426f0
DR0: 0000000000102000 DR1: 0000000000000004 DR2: 0000000000000000
DR3: 0000000000101000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 asymmetric_lookup_restriction+0x87/0x660 crypto/asymmetric_keys/asymmetric_type.c:485
 keyring_restrict+0xc8/0x4e0 security/keys/keyring.c:1018
 keyctl_restrict_keyring+0xea/0x170 security/keys/keyctl.c:1629
 SYSC_keyctl security/keys/keyctl.c:1750 [inline]
 SyS_keyctl+0x46/0x2c0 security/keys/keyctl.c:1641
 entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x4529d9
RSP: 002b:00007f38862b4c58 EFLAGS: 00000212 ORIG_RAX: 00000000000000fa
RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 00000000004529d9
RDX: 0000000020011000 RSI: ffffffffffffffff RDI: 000000000000001d
RBP: 000000000000039b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2728
R13: 00000000ffffffff R14: 00007f38862b56d4 R15: 0000000000000000
Code: 48 c1 e8 03 83 e2 07 42 0f b6 04 30 38 d0 7f 04 84 c0 75 55 48 89 f0 48 89 f2 41 0f b6 5c 24 ff 48 c1 e8 03 83 e2 07 4c 8d 6e 01 <42> 0f b6 04 30 38 d0 7f 04 84 c0 75 27 41 3a 5d ff 74 ae 19 c0 
RIP: strcmp+0x5a/0xb0 lib/string.c:328 RSP: ffff8801913e7d18
---[ end trace f71019dcf623ceee ]---
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/11/30 12:47 upstream ef0010a30935 29b0fd90 .config console log report ci-upstream-kasan-gce-386
* Struck through repros no longer work on HEAD.