panic: runtime error: slice bounds out of range [2:0] goroutine 5489 [running]: panic(0x121b340, 0xc0004c0300) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc001e01e70 sp=0xc001e01da8 pc=0x437c65 runtime.goPanicSliceB(0x2, 0x0) GOROOT/src/runtime/panic.go:116 +0xa5 fp=0xc001e01eb8 sp=0xc001e01e70 pc=0x435445 gvisor.dev/gvisor/pkg/tcpip/header.IPv4.SetTotalLength(...) pkg/tcpip/header/ipv4.go:378 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleValidatedPacket(0xc0001b5500, 0xc001038e46, 0x14, 0x14, 0xc0002db180, 0x130f9ca, 0x2) pkg/tcpip/network/ipv4/ipv4.go:938 +0x1505 fp=0xc001e02680 sp=0xc001e01eb8 pc=0xb417e5 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).HandlePacket(0xc0001b5500, 0xc0002db180) pkg/tcpip/network/ipv4/ipv4.go:773 +0x169 fp=0xc001e028e0 sp=0xc001e02680 pc=0xb3fcc9 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket(0xc0001c61e0, 0xc0004b7960, 0x6, 0xc0004b7966, 0x6, 0xc000000800, 0xc0002db180) pkg/tcpip/stack/nic.go:778 +0x2d0 fp=0xc001e02998 sp=0xc001e028e0 pc=0x961750 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket(0xc00019aa00, 0xc0004b7960, 0x6, 0xc0004b7966, 0x6, 0x800, 0xc0002db180) pkg/tcpip/link/nested/nested.go:59 +0xbe fp=0xc001e029f0 sp=0xc001e02998 pc=0xbe47be gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).DeliverNetworkPacket(0xc00019aa00, 0x0, 0x0, 0x0, 0x0, 0x800, 0xc0002db180) pkg/tcpip/link/ethernet/ethernet.go:71 +0x15f fp=0xc001e02a60 sp=0xc001e029f0 pc=0xe9501f gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WriteRawPacket(0xc00038fd70, 0xc0002daf00, 0x0, 0x0) pkg/tcpip/link/loopback/loopback.go:109 +0xfa fp=0xc001e02ad0 sp=0xc001e02a60 pc=0xe95a5a gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePackets(0xc00038fd70, 0xc0004b78b0, 0x4, 0xc0004b78b0, 0x4, 0x146a5d8, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/loopback/loopback.go:81 +0x65 fp=0xc001e02b10 sp=0xc001e02ad0 pc=0xe958a5 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePackets(...) pkg/tcpip/link/nested/nested.go:107 gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).WritePackets(0xc00019aa00, 0xc0004b78b0, 0x4, 0xc0004b78b0, 0x4, 0x146a5d8, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/ethernet/ethernet.go:91 +0x18a fp=0xc001e02c20 sp=0xc001e02b10 pc=0xe9528a gvisor.dev/gvisor/pkg/tcpip/stack.(*delegatingQueueingDiscipline).WritePacket(0xc00038fd90, 0xc0004b78b0, 0x4, 0xc0004b78b0, 0x4, 0x146a5d8, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:152 +0xca fp=0xc001e02cc0 sp=0xc001e02c20 pc=0x95e2ca gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket(0xc0001c61e0, 0xc0004b78b0, 0x4, 0xc0004b78b0, 0x4, 0x146a5d8, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:395 +0x136 fp=0xc001e02d58 sp=0xc001e02cc0 pc=0x95f9f6 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket(0xc0001c61e0, 0xc0003625a0, 0x800, 0xc0002daf00, 0x0, 0x0) pkg/tcpip/stack/nic.go:354 +0x210 fp=0xc001e02e98 sp=0xc001e02d58 pc=0x95f750 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacketPostRouting.func1(0xc0002daf00, 0xc001038da6, 0x14) pkg/tcpip/network/ipv4/ipv4.go:502 +0x50 fp=0xc001e02ed8 sp=0xc001e02e98 pc=0xb458d0 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleFragments(0xc0001b5500, 0xc0003625a0, 0xc00000ffde, 0xc0002dac80, 0xc001e03038, 0x130f9ca, 0x2, 0xc0010a4a01, 0x2) pkg/tcpip/network/ipv4/ipv4.go:411 +0x134 fp=0xc001e02fe8 sp=0xc001e02ed8 pc=0xb3dd74 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacketPostRouting(0xc0001b5500, 0xc0003625a0, 0xc0002dac80, 0xc0004b7800, 0x4, 0xc001038d01) pkg/tcpip/network/ipv4/ipv4.go:497 +0x26f fp=0xc001e03210 sp=0xc001e02fe8 pc=0xb3e46f gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket(0xc0001b5500, 0xc0003625a0, 0xc0002dac80, 0xc0004b78b0, 0x4) pkg/tcpip/network/ipv4/ipv4.go:459 +0x1a5 fp=0xc001e03298 sp=0xc001e03210 pc=0xb3e105 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket(0xc0001b5500, 0xc0003625a0, 0x4000000001, 0xc0002dac80, 0x963b2d, 0x14a17e8) pkg/tcpip/network/ipv4/ipv4.go:427 +0xe9 fp=0xc001e03308 sp=0xc001e03298 pc=0xb3df29 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc0003625a0, 0x4000000001, 0xc0002dac80, 0xc000bad418, 0xc0002dac80) pkg/tcpip/stack/route.go:465 +0xad fp=0xc001e03348 sp=0xc001e03308 pc=0x969fed gvisor.dev/gvisor/pkg/tcpip/transport/internal/network.(*WriteContext).WritePacket(0xc000bad430, 0xc0002dac80, 0x0, 0x1, 0xffe0) pkg/tcpip/transport/internal/network/endpoint.go:262 +0xb0 fp=0xc001e03380 sp=0xc001e03348 pc=0xaefcd0 gvisor.dev/gvisor/pkg/tcpip/transport/raw.(*endpoint).write(0xc00147cdc0, 0x1492ca0, 0xc001bdaf50, 0xc001084860, 0x0, 0x0, 0x0, 0x0) pkg/tcpip/transport/raw/endpoint.go:329 +0x49b fp=0xc001e03530 sp=0xc001e03380 pc=0xafab7b gvisor.dev/gvisor/pkg/tcpip/transport/raw.(*endpoint).Write(0xc00147cdc0, 0x1492ca0, 0xc001bdaf50, 0xc001084860, 0xc000000000, 0x4, 0x0, 0x9f0002) pkg/tcpip/transport/raw/endpoint.go:276 +0x90 fp=0xc001e03580 sp=0xc001e03530 pc=0xafa4b0 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).SendMsg(0xc0003eae70, 0xc001327500, 0x14ac8e0, 0xc00132c000, 0x0, 0x1, 0x20000040, 0xffe0, 0x100, 0xc0004b78a0, ...) pkg/sentry/socket/netstack/netstack.go:3051 +0x206 fp=0xc001e036e0 sp=0xc001e03580 pc=0xb81966 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.sendSingleMsg(0xc001327500, 0x7f63f123b7d8, 0xc0003eae00, 0xc0003eae00, 0x20001440, 0xc000000040, 0x0, 0xc001327501, 0x5599e6b72f68) pkg/sentry/syscalls/linux/vfs2/socket.go:1112 +0x4d5 fp=0xc001e03a40 sp=0xc001e036e0 pc=0xe72695 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.SendMMsg(0xc001327500, 0x4, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:1036 +0x2a5 fp=0xc001e03b10 sp=0xc001e03a40 pc=0xe71dc5 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc001327500, 0x133, 0x4, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0x0, 0x130aac0, ...) pkg/sentry/kernel/task_syscall.go:103 +0x13c fp=0xc001e03c70 sp=0xc001e03b10 pc=0x9edcdc gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc001327500, 0x133, 0x4, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:238 +0x66 fp=0xc001e03cf8 sp=0xc001e03c70 pc=0x9eee86 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc001327500, 0x133, 0x4, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0xc000d54ca0, 0xc000d54c00) pkg/sentry/kernel/task_syscall.go:198 +0x98 fp=0xc001e03d58 sp=0xc001e03cf8 pc=0x9eea78 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc001327500, 0x2, 0xc001327500) pkg/sentry/kernel/task_syscall.go:173 +0x15c fp=0xc001e03e28 sp=0xc001e03d58 pc=0x9ee41c gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc001327500, 0x1484f00, 0x0) pkg/sentry/kernel/task_run.go:282 +0xccc fp=0xc001e03f68 sp=0xc001e03e28 pc=0x9e31cc gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc001327500, 0x1b7) pkg/sentry/kernel/task_run.go:97 +0x182 fp=0xc001e03fd0 sp=0xc001e03f68 pc=0x9e1e02 runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc001e03fd8 sp=0xc001e03fd0 pc=0x472861 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:340 +0xfe