syzbot


general protection fault in put_pid

Status: fixed on 2019/11/08 07:00
Reported-by: syzbot+1145ec2e23165570c3ac@syzkaller.appspotmail.com
Fix commit: a8e911d13540 x86_64: increase stack size for KASAN_EXTRA
First crash: 1397d, last: 1328d

Cause bisection: introduced by (bisect log) :
commit b9b8a41adeff5666b402996020b698504c927353
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon Aug 20 08:25:33 2018 +0000

  btrfs: use after free in btrfs_quota_enable

Crash: kernel panic: corrupted stack end in wb_workfn (log)
Repro: syz .config

Fix bisection: fixed by (bisect log) :
commit a8e911d13540487942d53137c156bd7707f66e5d
Author: Qian Cai <cai@lca.pw>
Date: Fri Feb 1 22:20:20 2019 +0000

  x86_64: increase stack size for KASAN_EXTRA


Sample crash report:
kmem_cache               221KB        225KB
Out of memory: Kill process 6139 (syz-execprog) score 1 or sacrifice child
Killed process 6164 (syz-executor0) total-vm:37444kB, anon-rss:60kB, file-rss:0kB, shmem-rss:0kB
oom_reaper: reaped process 6164 (syz-executor0), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 6159 Comm: syz-executor3 Not tainted 4.20.0-rc6+ #151
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:put_pid.part.3+0xb6/0x240 kernel/pid.c:108
Code: d2 0f 85 89 01 00 00 44 8b 63 04 49 8d 44 24 03 48 c1 e0 04 48 8d 7c 03 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 66 01 00 00 49 83 c4 03 be 04 00 00 00 48 89 df
RSP: 0018:ffff8881ae116e78 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffffff816149a0 RCX: ffffffff833e420e
RDX: 00000001933eab7c RSI: ffffffff8152bf8e RDI: 0000000c99f55be0
RBP: ffff8881ae116f08 R08: ffff8881cdbf2300 R09: fffff52001507600
R10: fffff52001507600 R11: ffffc9000a83b003 R12: 00000000d1894120
R13: 1ffff11035c22dd0 R14: ffff8881ae116ee0 R15: dffffc0000000000
FS:  000000000166d940(0000) GS:ffff8881dae00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000075c458 CR3: 00000001d2bd1000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 put_pid+0x1f/0x30 kernel/pid.c:105
 ipc_update_pid ipc/util.h:159 [inline]
 freeary+0x10c8/0x1a40 ipc/sem.c:1167
 free_ipcs+0x9f/0x1c0 ipc/namespace.c:112
 sem_exit_ns+0x20/0x40 ipc/sem.c:237
 free_ipc_ns ipc/namespace.c:120 [inline]
 put_ipc_ns+0x66/0x180 ipc/namespace.c:152
 free_nsproxy+0xcf/0x220 kernel/nsproxy.c:180
 switch_task_namespaces+0xb3/0xd0 kernel/nsproxy.c:229
 exit_task_namespaces+0x17/0x20 kernel/nsproxy.c:234
 do_exit+0x1ad1/0x26d0 kernel/exit.c:866
 do_group_exit+0x177/0x440 kernel/exit.c:970
 get_signal+0x8b0/0x1980 kernel/signal.c:2517
 do_signal+0x9c/0x21c0 arch/x86/kernel/signal.c:816
 exit_to_usermode_loop+0x2e5/0x380 arch/x86/entry/common.c:162
 prepare_exit_to_usermode+0x342/0x3b0 arch/x86/entry/common.c:197
 retint_user+0x8/0x18
RIP: 0033:0x45a4d0
Code: 10 44 00 00 00 e8 c0 cc ff ff 0f b6 44 24 18 eb c2 e8 44 ad ff ff e9 6f ff ff ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc <64> 48 8b 0c 25 f8 ff ff ff 48 3b 61 10 76 68 48 83 ec 28 48 89 6c
RSP: 002b:00007fff9b9d3578 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000000a4edb RCX: 0000000000483170
RDX: 0000000000000000 RSI: 00007fff9b9d3580 RDI: 0000000000000001
RBP: 00000000000002ef R08: 0000000000000001 R09: 000000000166d940
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 00000000000a4e70 R14: 00000000000001f1 R15: 0000000000000003
Modules linked in:
---[ end trace 9933854824df8420 ]---
RIP: 0010:put_pid.part.3+0xb6/0x240 kernel/pid.c:108
Code: d2 0f 85 89 01 00 00 44 8b 63 04 49 8d 44 24 03 48 c1 e0 04 48 8d 7c 03 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 66 01 00 00 49 83 c4 03 be 04 00 00 00 48 89 df
RSP: 0018:ffff8881ae116e78 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffffff816149a0 RCX: ffffffff833e420e
RDX: 00000001933eab7c RSI: ffffffff8152bf8e RDI: 0000000c99f55be0
RBP: ffff8881ae116f08 R08: ffff8881cdbf2300 R09: fffff52001507600
R10: fffff52001507600 R11: ffffc9000a83b003 R12: 00000000d1894120
R13: 1ffff11035c22dd0 R14: ffff8881ae116ee0 R15: dffffc0000000000
FS:  000000000166d940(0000) GS:ffff8881dae00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000075c458 CR3: 00000001d2bd1000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2018/12/11 18:50 upstream f5d582777bcb 7795ae03 .config log report syz
ci-upstream-kasan-gce 2018/12/21 10:18 upstream 9097a058d49e 2b497001 .config log report
ci-upstream-kasan-gce 2018/10/13 10:09 upstream bab5c80b2110 caf12900 .config log report