syzbot


panic: unable to find an index for ID: 0

Status: fixed on 2021/07/24 01:40
Fix commit: 3d0a9300050a Don't panic on user-controlled state in semaphore syscalls.
First crash: 1222d, last: 1221d

Sample crash report:
panic: unable to find an index for ID: 0

goroutine 554 [running]:
panic(0x17d7b20, 0xc0002f2a70)
	GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc0005e5468 sp=0xc0005e53a0 pc=0x43a6c5
gvisor.dev/gvisor/pkg/sentry/kernel/semaphore.(*Registry).Remove(0xc0004be120, 0xc000000000, 0xc000603500, 0x0, 0x0)
	pkg/sentry/kernel/semaphore/semaphore.go:222 +0x23f fp=0xc0005e5518 sp=0xc0005e5468 pc=0xb0bc7f
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.remove(0xc000267500, 0xc000000000, 0x0, 0x0)
	pkg/sentry/syscalls/linux/sys_sem.go:243 +0x94 fp=0xc0005e5570 sp=0xc0005e5518 pc=0xdf45d4
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Semctl(0xc000267500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x0, 0x0, ...)
	pkg/sentry/syscalls/linux/sys_sem.go:160 +0x3c5 fp=0xc0005e5720 sp=0xc0005e5570 pc=0xdf39e5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000267500, 0x42, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	pkg/sentry/kernel/task_syscall.go:104 +0x453 fp=0xc0005e59c0 sp=0xc0005e5720 pc=0xd40c93
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000267500, 0x42, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000267ddf, 0xc000267500)
	pkg/sentry/kernel/task_syscall.go:239 +0xb4 fp=0xc0005e5a98 sp=0xc0005e59c0 pc=0xd42474
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc000267500, 0x42, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4790cc, 0x4860df)
	pkg/sentry/kernel/task_syscall.go:199 +0x10f fp=0xc0005e5b40 sp=0xc0005e5a98 pc=0xd41d6f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000267500, 0x2, 0xc000267500)
	pkg/sentry/kernel/task_syscall.go:174 +0x214 fp=0xc0005e5cb0 sp=0xc0005e5b40 pc=0xd414f4
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc000267500, 0x1c4e2a0, 0x0)
	pkg/sentry/kernel/task_run.go:282 +0x12c7 fp=0xc0005e5ed0 sp=0xc0005e5cb0 pc=0xd2d467
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000267500, 0xf)
	pkg/sentry/kernel/task_run.go:97 +0x393 fp=0xc0005e5fd0 sp=0xc0005e5ed0 pc=0xd2b593
runtime.goexit()
	src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0005e5fd8 sp=0xc0005e5fd0 pc=0x477501
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:328 +0x1a5

Crashes (1497):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/24 00:44 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/24 00:40 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 23:41 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 23:29 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 23:28 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 23:07 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 23:04 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 23:03 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 22:33 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 21:34 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 21:31 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 20:12 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1 panic: unable to find an index for ID: 0
2021/07/23 20:04 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 19:55 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 19:50 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1-cover panic: unable to find an index for ID: 0
2021/07/23 19:48 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2-race panic: unable to find an index for ID: 0
2021/07/23 19:48 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 19:48 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2-cover panic: unable to find an index for ID: 0
2021/07/23 19:47 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-cover panic: unable to find an index for ID: 0
2021/07/23 19:47 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm-cover panic: unable to find an index for ID: 0
2021/07/23 19:46 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 19:45 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 19:42 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 19:40 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1 panic: unable to find an index for ID: 0
2021/07/23 19:34 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 19:29 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 19:21 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1 panic: unable to find an index for ID: 0
2021/07/23 19:01 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:55 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 18:43 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 18:40 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:40 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 18:34 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 18:33 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 18:30 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:28 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 18:27 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 18:27 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1 panic: unable to find an index for ID: 0
2021/07/23 18:27 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-1-cover panic: unable to find an index for ID: 0
2021/07/23 18:25 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2-race panic: unable to find an index for ID: 0
2021/07/23 18:24 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-2-cover panic: unable to find an index for ID: 0
2021/07/23 18:24 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3-cover panic: unable to find an index for ID: 0
2021/07/23 18:21 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 13:04 gvisor aa2698170041 bc5f1d88 .config console log report syz C ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/24 00:51 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/24 00:44 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/24 00:26 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/24 00:05 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 23:56 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1-cover panic: unable to find an index for ID: 0
2021/07/23 23:52 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 23:33 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 23:14 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 23:08 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-cover panic: unable to find an index for ID: 0
2021/07/23 22:54 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1 panic: unable to find an index for ID: 0
2021/07/23 22:32 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 22:26 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 22:19 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 22:04 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 21:51 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 21:39 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 21:39 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 21:14 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 20:59 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 20:42 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-cover panic: unable to find an index for ID: 0
2021/07/23 20:26 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-cover panic: unable to find an index for ID: 0
2021/07/23 20:16 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 20:09 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-cover panic: unable to find an index for ID: 0
2021/07/23 20:04 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm-cover panic: unable to find an index for ID: 0
2021/07/23 19:58 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 19:37 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1-race panic: unable to find an index for ID: 0
2021/07/23 19:13 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 18:57 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:43 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:32 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:27 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:23 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 18:09 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 17:56 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-2-race panic: unable to find an index for ID: 0
2021/07/23 17:52 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 17:48 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-cover panic: unable to find an index for ID: 0
2021/07/23 17:41 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1 panic: unable to find an index for ID: 0
2021/07/23 17:35 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-kvm panic: unable to find an index for ID: 0
2021/07/23 17:29 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 17:21 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 17:12 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-2 panic: unable to find an index for ID: 0
2021/07/23 17:01 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 16:50 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 16:44 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 16:40 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 16:34 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-2-race panic: unable to find an index for ID: 0
2021/07/23 16:30 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 16:23 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3 panic: unable to find an index for ID: 0
2021/07/23 16:18 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race panic: unable to find an index for ID: 0
2021/07/23 15:15 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-3-race-cover panic: unable to find an index for ID: 0
2021/07/23 13:19 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-2-race-cover panic: unable to find an index for ID: 0
2021/07/23 12:34 gvisor aa2698170041 bc5f1d88 .config console log report info ci-gvisor-ptrace-1-race-cover panic: unable to find an index for ID: 0
* Struck through repros no longer work on HEAD.