panic: runtime error: slice bounds out of range [2:0] goroutine 17262 [running]: panic(0x1331620, 0xc000dba990) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc001299ee0 sp=0xc001299e18 pc=0x437c65 runtime.goPanicSliceB(0x2, 0x0) GOROOT/src/runtime/panic.go:116 +0xa5 fp=0xc001299f28 sp=0xc001299ee0 pc=0x435445 gvisor.dev/gvisor/pkg/tcpip/header.IPv4.SetTotalLength(...) pkg/tcpip/header/ipv4.go:419 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleValidatedPacket(0xc000540e00, 0xc0005c2216, 0x14, 0x14, 0xc00527f400, 0x1425eea, 0x2) pkg/tcpip/network/ipv4/ipv4.go:1137 +0x17bd fp=0xc00129a6f0 sp=0xc001299f28 pc=0xc014bd gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).HandlePacket(0xc000540e00, 0xc00527f400) pkg/tcpip/network/ipv4/ipv4.go:928 +0x1a5 fp=0xc00129a950 sp=0xc00129a6f0 pc=0xbff685 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket(0xc00000a1e0, 0xc003c69bb8, 0x6, 0xc003c69bc0, 0x6, 0x800, 0xc00527f400) pkg/tcpip/stack/nic.go:941 +0x3ae fp=0xc00129aa08 sp=0xc00129a950 pc=0x9dec2e gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket(0xc0001c8be0, 0xc003c69bb8, 0x6, 0xc003c69bc0, 0x6, 0x800, 0xc00527f400) pkg/tcpip/link/nested/nested.go:63 +0x104 fp=0xc00129aa68 sp=0xc00129aa08 pc=0xcb4ae4 gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).DeliverNetworkPacket(0xc0001c8be0, 0x0, 0x0, 0x0, 0x0, 0x800, 0xc00527f400) pkg/tcpip/link/ethernet/ethernet.go:82 +0x1bb fp=0xc00129aad8 sp=0xc00129aa68 pc=0xf98dfb gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WriteRawPacket(0xc0005ccc30, 0xc0053ea8c0, 0x0, 0x0) pkg/tcpip/link/loopback/loopback.go:125 +0x128 fp=0xc00129ab48 sp=0xc00129aad8 pc=0xf99a88 gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePackets(0xc0005ccc30, 0xc0050432c0, 0x4, 0xc0050432c0, 0x4, 0x15ae7c0, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/loopback/loopback.go:91 +0x94 fp=0xc00129ab88 sp=0xc00129ab48 pc=0xf99894 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePackets(...) pkg/tcpip/link/nested/nested.go:120 gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).WritePackets(0xc0001c8be0, 0xc0050432c0, 0x4, 0xc0050432c0, 0x4, 0x15ae7c0, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/ethernet/ethernet.go:108 +0x1ab fp=0xc00129ac98 sp=0xc00129ab88 pc=0xf990ab gvisor.dev/gvisor/pkg/tcpip/stack.(*delegatingQueueingDiscipline).WritePacket(0xc0005ccc40, 0xc0050432c0, 0x4, 0xc0050432c0, 0x4, 0x15ae7c0, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:166 +0xd0 fp=0xc00129ad48 sp=0xc00129ac98 pc=0x9db130 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket(0xc00000a1e0, 0xc0050432c0, 0x4, 0xc0050432c0, 0x4, 0x15ae7c0, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:451 +0x158 fp=0xc00129ade0 sp=0xc00129ad48 pc=0x9dcab8 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket(0xc00000a1e0, 0xc005864320, 0x800, 0xc0053ea8c0, 0x0, 0x0) pkg/tcpip/stack/nic.go:406 +0x230 fp=0xc00129af20 sp=0xc00129ade0 pc=0x9dc7d0 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacketPostRouting.func1(0xc0053ea8c0, 0xc005421206, 0x14) pkg/tcpip/network/ipv4/ipv4.go:592 +0x5a fp=0xc00129af60 sp=0xc00129af20 pc=0xc062ba gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleFragments(0xc000540e00, 0xc005864320, 0xc00000ffde, 0xc0034992c0, 0xc00129b0e0, 0x1425eea, 0x2, 0x1, 0x0) pkg/tcpip/network/ipv4/ipv4.go:476 +0x15e fp=0xc00129b070 sp=0xc00129af60 pc=0xbfd21e gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacketPostRouting(0xc000540e00, 0xc005864320, 0xc0034992c0, 0xc005043200, 0x4, 0xc005421201) pkg/tcpip/network/ipv4/ipv4.go:586 +0x332 fp=0xc00129b2b8 sp=0xc00129b070 pc=0xbfdab2 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket(0xc000540e00, 0xc005864320, 0xc0034992c0, 0xc0050432c0, 0x4) pkg/tcpip/network/ipv4/ipv4.go:536 +0x205 fp=0xc00129b340 sp=0xc00129b2b8 pc=0xbfd685 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket(0xc000540e00, 0xc005864320, 0x4000000001, 0xc0034992c0, 0x9e18d7, 0x15e5fe8) pkg/tcpip/network/ipv4/ipv4.go:498 +0x11b fp=0xc00129b3b0 sp=0xc00129b340 pc=0xbfd43b gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc005864320, 0x4000000001, 0xc0034992c0, 0xc0021914c0, 0xc0034992c0) pkg/tcpip/stack/route.go:572 +0xd7 fp=0xc00129b3f0 sp=0xc00129b3b0 pc=0x9e94f7 gvisor.dev/gvisor/pkg/tcpip/transport/internal/network.(*WriteContext).WritePacket(0xc0021914d8, 0xc0034992c0, 0x0, 0x1, 0xffe0) pkg/tcpip/transport/internal/network/endpoint.go:295 +0xd6 fp=0xc00129b428 sp=0xc00129b3f0 pc=0xb9e916 gvisor.dev/gvisor/pkg/tcpip/transport/raw.(*endpoint).write(0xc005361080, 0x15d76a0, 0xc004cda050, 0xc002c00fa0, 0x0, 0x0, 0x0, 0x0) pkg/tcpip/transport/raw/endpoint.go:392 +0x53b fp=0xc00129b5d8 sp=0xc00129b428 pc=0xbabdbb gvisor.dev/gvisor/pkg/tcpip/transport/raw.(*endpoint).Write(0xc005361080, 0x15d76a0, 0xc004cda050, 0xc002c00fa0, 0xc005000000, 0x4, 0x0, 0xa80002) pkg/tcpip/transport/raw/endpoint.go:323 +0xc5 fp=0xc00129b628 sp=0xc00129b5d8 pc=0xbab525 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).SendMsg(0xc0005738f0, 0xc003e0d500, 0x15f1060, 0xc00419a000, 0x0, 0x1, 0x20000040, 0xffe0, 0x100, 0xc0050432b0, ...) pkg/sentry/socket/netstack/netstack.go:3915 +0x243 fp=0xc00129b788 sp=0xc00129b628 pc=0xc4b043 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.sendSingleMsg(0xc003e0d500, 0x7ff91e1451f0, 0xc000573880, 0xc000573880, 0x20001440, 0x0, 0xc000ce9980, 0x200000003, 0xc000ce9980) pkg/sentry/syscalls/linux/vfs2/socket.go:1437 +0x555 fp=0xc00129bae8 sp=0xc00129b788 pc=0xf733b5 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.SendMMsg(0xc003e0d500, 0x5, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:1329 +0x37f fp=0xc00129bbb8 sp=0xc00129bae8 pc=0xf729df gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc003e0d500, 0x133, 0x5, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1420fe0, ...) pkg/sentry/kernel/task_syscall.go:115 +0x199 fp=0xc00129bc78 sp=0xc00129bbb8 pc=0xa80619 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc003e0d500, 0x133, 0x5, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:290 +0x70 fp=0xc00129bd00 sp=0xc00129bc78 pc=0xa818f0 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc003e0d500, 0x133, 0x5, 0x20001440, 0x1, 0x0, 0x0, 0x0, 0xfc3710, 0xc0028fe9a0) pkg/sentry/kernel/task_syscall.go:237 +0xb4 fp=0xc00129bd60 sp=0xc00129bd00 pc=0xa813d4 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc003e0d500, 0x2, 0xc003e0d500) pkg/sentry/kernel/task_syscall.go:204 +0x198 fp=0xc00129be30 sp=0xc00129bd60 pc=0xa80cb8 gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc003e0d500, 0x15c9900, 0x0) pkg/sentry/kernel/task_run.go:327 +0xe5f fp=0xc00129bf68 sp=0xc00129be30 pc=0xa73bdf gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc003e0d500, 0x72d) pkg/sentry/kernel/task_run.go:100 +0x1b9 fp=0xc00129bfd0 sp=0xc00129bf68 pc=0xa72619 runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc00129bfd8 sp=0xc00129bfd0 pc=0x472861 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:396 +0x116