syzbot


panic: runtime error: index out of range [NUM] with length NUM (2)

Status: fixed on 2022/01/26 19:49
Fix commit: 5fb527632358 Handle 0 sized writes to /dev/net/tun.
First crash: 1041d, last: 1034d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: runtime error: index out of range [NUM] with length NUM C 12 1127d 1129d 14/26 fixed on 2021/10/27 00:49
gvisor panic: runtime error: index out of range [NUM] with length NUM (3) C 372 673d 676d 18/26 fixed on 2023/01/23 05:20

Sample crash report:
panic: runtime error: index out of range [0] with length 0

goroutine 277 [running]:
panic(0x1a069e0, 0xc000566228)
	GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc00082b8b8 sp=0xc00082b7f0 pc=0x43a6c5
runtime.goPanicIndex(0x0, 0x0)
	GOROOT/src/runtime/panic.go:88 +0xa5 fp=0xc00082b900 sp=0xc00082b8b8 pc=0x437a25
gvisor.dev/gvisor/pkg/tcpip/link/tun.(*Device).Write(0xc0001e0668, 0x31584d8, 0x0, 0x0, 0x0, 0x0, 0x0)
	pkg/tcpip/link/tun/device.go:214 +0x89d fp=0xc00082ba80 sp=0xc00082b900 pc=0xfd22bd
gvisor.dev/gvisor/pkg/sentry/devices/tundev.(*tunFD).Write(0xc0001e0600, 0x1dc0090, 0xc0003ea4d0, 0x1dba1a0, 0xc00026a000, 0x0, 0x1, 0x0, 0x0, 0x0, ...)
	pkg/sentry/devices/tundev/tundev.go:146 +0x237 fp=0xc00082bba8 sp=0xc00082ba80 pc=0x1576977
gvisor.dev/gvisor/pkg/sentry/devices/tundev.(*tunFD).PWrite(0xc0001e0600, 0x1dc0090, 0xc0003ea4d0, 0x1dba1a0, 0xc00026a000, 0x0, 0x1, 0x0, 0x0, 0x0, ...)
	pkg/sentry/devices/tundev/tundev.go:137 +0xef fp=0xc00082bc78 sp=0xc00082bba8 pc=0x15766cf
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).PWrite(0xc0001e0600, 0x1dc0090, 0xc0003ea4d0, 0x1dba1a0, 0xc00026a000, 0x0, 0x1, 0x0, 0x0, 0x0, ...)
	pkg/sentry/vfs/file_description.go:645 +0x15a fp=0xc00082bd60 sp=0xc00082bc78 pc=0x96163a
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.getAIOCallback.func1(0x1dc0090, 0xc0003ea4d0)
	pkg/sentry/syscalls/linux/vfs2/aio.go:174 +0x5ae fp=0xc00082bfa0 sp=0xc00082bd60 pc=0x1498a6e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).QueueAIO.func1(0xc0003c2070, 0x1dc0090, 0xc0003ea4d0, 0xc00016c3ac)
	pkg/sentry/kernel/aio.go:30 +0x48 fp=0xc00082bfc0 sp=0xc00082bfa0 pc=0xdb4ca8
runtime.goexit()
	src/runtime/asm_amd64.s:1371 +0x1 fp=0xc00082bfc8 sp=0xc00082bfc0 pc=0x477541
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).QueueAIO
	pkg/sentry/kernel/aio.go:29 +0x14c

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/20 06:37 gvisor 3d578afc8da9 5da9499f .config console log report syz C ci-gvisor-ptrace-2-race panic: runtime error: index out of range [NUM] with length NUM
2022/01/20 05:44 gvisor 0e492a2b5e6d 5da9499f .config console log report syz C ci-gvisor-ptrace-1 panic: runtime error: index out of range [NUM] with length NUM
2022/01/20 04:45 gvisor 0e492a2b5e6d 5da9499f .config console log report syz C ci-gvisor-ptrace-2 panic: runtime error: index out of range [NUM] with length NUM
2022/01/20 04:15 gvisor 0e492a2b5e6d 5da9499f .config console log report syz C ci-gvisor-ptrace-2-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/20 04:07 gvisor 0e492a2b5e6d 5da9499f .config console log report syz C ci-gvisor-kvm panic: runtime error: index out of range [NUM] with length NUM
2022/01/20 03:49 gvisor 0e492a2b5e6d 5da9499f .config console log report syz C ci-gvisor-ptrace-1-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/20 03:17 gvisor 0e492a2b5e6d 5da9499f .config console log report syz C ci-gvisor-kvm-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:28 gvisor 3d578afc8da9 0620189b .config console log report syz C ci-gvisor-ptrace-1-race panic: runtime error: index out of range [NUM] with length NUM
2022/01/26 19:03 gvisor 3d578afc8da9 2cbffd88 .config console log report info ci-gvisor-ptrace-2-race-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/26 19:02 gvisor 3d578afc8da9 2cbffd88 .config console log report info ci-gvisor-ptrace-1-race-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/25 00:20 gvisor 3d578afc8da9 2cbffd88 .config console log report info ci-gvisor-ptrace-2-race-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/25 00:09 gvisor 3d578afc8da9 2cbffd88 .config console log report info ci-gvisor-ptrace-1-race panic: runtime error: index out of range [NUM] with length NUM
2022/01/25 00:09 gvisor 3d578afc8da9 2cbffd88 .config console log report info ci-gvisor-ptrace-2-race panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:20 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-1-race panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:16 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-2-race-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:11 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-1-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:11 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-1 panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:11 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-2-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:11 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-2 panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:03 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-1-race-cover panic: runtime error: index out of range [NUM] with length NUM
2022/01/19 20:03 gvisor 3d578afc8da9 0620189b .config console log report info ci-gvisor-ptrace-2-race panic: runtime error: index out of range [NUM] with length NUM
* Struck through repros no longer work on HEAD.