panic: runtime error: slice bounds out of range [40:0] goroutine 9084 [running]: panic(0x11885c0, 0xc0000f4120) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc0809e4340 sp=0xc0809e4278 pc=0x437c65 runtime.goPanicSliceB(0x28, 0x0) GOROOT/src/runtime/panic.go:116 +0xa5 fp=0xc0809e4388 sp=0xc0809e4340 pc=0x435445 gvisor.dev/gvisor/pkg/tcpip/header.IPv6.Encode(0x0, 0x0, 0x0, 0xc0809e4440) pkg/tcpip/header/ipv6.go:274 +0x1e6 fp=0xc0809e43f0 sp=0xc0809e4388 pc=0x8fddc6 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.addIPHeader(0xc00003c560, 0x10, 0xc00003c280, 0x10, 0xc00003a700, 0x4000000006, 0x0, 0x0, 0x0, 0xc0009a2190, ...) pkg/tcpip/network/ipv6/ipv6.go:681 +0x205 fp=0xc0809e44a0 sp=0xc0809e43f0 pc=0xb081e5 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).WritePacket(0xc0004f1000, 0xc0009a2140, 0xe93f004000000006, 0xc00003a700, 0x1414, 0xc000556176) pkg/tcpip/network/ipv6/ipv6.go:744 +0x85 fp=0xc0809e4508 sp=0xc0809e44a0 pc=0xb08685 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc0009a2140, 0x4000000006, 0xc00003a700, 0x10, 0xe93f) pkg/tcpip/stack/route.go:462 +0xad fp=0xc0809e4548 sp=0xc0809e4508 pc=0x93f02d gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc0009a2140, 0x0, 0xc00003c270, 0x10, 0xe93f, 0xc00003c260, 0x10, 0x140040, 0xbbe76bda, 0x0, ...) pkg/tcpip/transport/tcp/connect.go:890 +0x285 fp=0xc0809e6398 sp=0xc0809e4548 pc=0xac1f25 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.replyWithReset(0xc000318e00, 0xc000314600, 0x0, 0x0, 0x0) pkg/tcpip/transport/tcp/protocol.go:216 +0x1e5 fp=0xc0809e64f0 sp=0xc0809e6398 pc=0xad36c5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*protocol).HandleUnknownDestinationPacket(0xc00029a600, 0x0, 0xc00003c270, 0x10, 0xe93f, 0xc00003c260, 0x10, 0xc00003a600, 0x0) pkg/tcpip/transport/tcp/protocol.go:156 +0x13b fp=0xc0809e6570 sp=0xc0809e64f0 pc=0xad337b gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc0004ee380, 0x6, 0xc00003a600, 0x1) pkg/tcpip/stack/nic.go:870 +0x351 fp=0xc0809e6678 sp=0xc0809e6570 pc=0x937d31 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).processExtensionHeaders(0xc0004f1000, 0xc00078618e, 0x28, 0x50, 0xc00003a600, 0x0, 0xc00050ce80, 0x7) pkg/tcpip/network/ipv6/ipv6.go:1556 +0x1923 fp=0xc0809e6ff8 sp=0xc0809e6678 pc=0xb0cf03 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleValidatedPacket(0xc0004f1000, 0xc00078618e, 0x28, 0x50, 0xc00003a600, 0xc00050ce80, 0x7) pkg/tcpip/network/ipv6/ipv6.go:1190 +0x336 fp=0xc0809e7270 sp=0xc0809e6ff8 pc=0xb0b156 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleLocalPacket(0xc0004f1000, 0xc00003a600, 0x9901) pkg/tcpip/network/ipv6/ipv6.go:1126 +0x157 fp=0xc0809e7480 sp=0xc0809e7270 pc=0xb0adb7 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).writePacket(0xc0004f1000, 0xc0009a20a0, 0xc00003a500, 0x6, 0x0, 0x0) pkg/tcpip/network/ipv6/ipv6.go:782 +0x4ae fp=0xc0809e76b8 sp=0xc0809e7480 pc=0xb08dae gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).WritePacket(0xc0004f1000, 0xc0009a20a0, 0x4000000006, 0xc00003a500, 0x70800228, 0xc0007861b6) pkg/tcpip/network/ipv6/ipv6.go:774 +0x16c fp=0xc0809e7720 sp=0xc0809e76b8 pc=0xb0876c gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc0009a20a0, 0x4000000006, 0xc00003a500, 0xc000666458, 0x0) pkg/tcpip/stack/route.go:462 +0xad fp=0xc0809e7760 sp=0xc0809e7720 pc=0x93f02d gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc0009a20a0, 0xe93f, 0xc00050d420, 0x10, 0x0, 0xc00050d420, 0x10, 0xbbe76bd900020040, 0x708000000000, 0xc0000e2c90, ...) pkg/tcpip/transport/tcp/connect.go:890 +0x285 fp=0xc0809e95b0 sp=0xc0809e7760 pc=0xac1f25 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendTCP(0xc000318700, 0xc0009a20a0, 0xe93f, 0xc00050d420, 0x10, 0x0, 0xc00050d420, 0x10, 0xbbe76bd900020000, 0x708000000000, ...) pkg/tcpip/transport/tcp/connect.go:782 +0xea fp=0xc0809e9680 sp=0xc0809e95b0 pc=0xac12ea gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendSynTCP(0xc000318700, 0xc0009a20a0, 0xe93f, 0xc00050d420, 0x10, 0x0, 0xc00050d420, 0x10, 0xbbe76bd900020000, 0x708000000000, ...) pkg/tcpip/transport/tcp/connect.go:773 +0xdc fp=0xc0809e9760 sp=0xc0809e9680 pc=0xac113c gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*handshake).start(0xc000642180) pkg/tcpip/transport/tcp/connect.go:512 +0x2da fp=0xc0809e9898 sp=0xc0809e9760 pc=0xabff5a gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).connect(0xc000318700, 0x0, 0x0, 0x0, 0x0, 0x101, 0x0, 0x0) pkg/tcpip/transport/tcp/endpoint.go:2363 +0x83a fp=0xc0809eaf40 sp=0xc0809e9898 pc=0xacd13a gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).Connect(0xc000318700, 0xc000000000, 0x0, 0x0, 0x0, 0x0, 0xc0004d0000) pkg/tcpip/transport/tcp/endpoint.go:2096 +0x7c fp=0xc0809eb960 sp=0xc0809eaf40 pc=0xacc7fc gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).Connect(0xc00052d250, 0xc000834a80, 0xc000580180, 0x1c, 0x1c, 0x1, 0x0) pkg/sentry/socket/netstack/netstack.go:606 +0x364 fp=0xc0809eba60 sp=0xc0809eb960 pc=0xb33724 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Connect(0xc000834a80, 0x4, 0x20000080, 0x1c, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:275 +0x1bb fp=0xc0809ebb00 sp=0xc0809eba60 pc=0xe040bb gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000834a80, 0x2a, 0x4, 0x20000080, 0x1c, 0x3, 0x3, 0x3, 0xe45b70, 0x126c080, ...) pkg/sentry/kernel/task_syscall.go:103 +0x13c fp=0xc0809ebc60 sp=0xc0809ebb00 pc=0x9c4e5c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000834a80, 0x2a, 0x4, 0x20000080, 0x1c, 0x3, 0x3, 0x3, 0x3, 0x3) pkg/sentry/kernel/task_syscall.go:238 +0x66 fp=0xc0809ebce8 sp=0xc0809ebc60 pc=0x9c5fe6 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc000834a80, 0x2a, 0x4, 0x20000080, 0x1c, 0x3, 0x3, 0x3, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:198 +0x98 fp=0xc0809ebd48 sp=0xc0809ebce8 pc=0x9c5bd8 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000834a80, 0x2, 0xc000834a80) pkg/sentry/kernel/task_syscall.go:173 +0x15c fp=0xc0809ebe18 sp=0xc0809ebd48 pc=0x9c557c gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc000834a80, 0x13d5ba0, 0x0) pkg/sentry/kernel/task_run.go:282 +0xc8c fp=0xc0809ebf60 sp=0xc0809ebe18 pc=0x9ba20c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000834a80, 0x25) pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc0809ebfd0 sp=0xc0809ebf60 pc=0x9b8e8f runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0809ebfd8 sp=0xc0809ebfd0 pc=0x472821 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:327 +0xfe