panic: runtime error: slice bounds out of range [40:0] goroutine 532503 [running]: panic(0x116ebe0, 0xc00099b458) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc189080320 sp=0xc189080258 pc=0x437c65 runtime.goPanicSliceB(0x28, 0x0) GOROOT/src/runtime/panic.go:116 +0xa5 fp=0xc189080368 sp=0xc189080320 pc=0x435445 gvisor.dev/gvisor/pkg/tcpip/header.IPv6.Encode(0x0, 0x0, 0x0, 0xc189080420) pkg/tcpip/header/ipv6.go:274 +0x1e6 fp=0xc1890803d0 sp=0xc189080368 pc=0x8f6de6 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.addIPHeader(0xc003656120, 0x10, 0xc003656110, 0x10, 0xc0039c8e00, 0x4000000006, 0x0, 0x0, 0x0, 0xc001ef0730, ...) pkg/tcpip/network/ipv6/ipv6.go:681 +0x205 fp=0xc189080480 sp=0xc1890803d0 pc=0xb08305 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).WritePacket(0xc0024b6800, 0xc001ef06e0, 0x549e004000000006, 0xc0039c8e00, 0x1414, 0xc0056da716) pkg/tcpip/network/ipv6/ipv6.go:744 +0x85 fp=0xc1890804e8 sp=0xc189080480 pc=0xb087a5 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc001ef06e0, 0x4000000006, 0xc0039c8e00, 0x10, 0x549e) pkg/tcpip/stack/route.go:462 +0xad fp=0xc189080528 sp=0xc1890804e8 pc=0x9378ed gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc001ef06e0, 0x0, 0xc003656100, 0x10, 0x549e, 0xc0036560f0, 0x10, 0x140040, 0x1fa897a, 0x0, ...) pkg/tcpip/transport/tcp/connect.go:842 +0x285 fp=0xc189082378 sp=0xc189080528 pc=0xab80e5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.replyWithReset(0xc0002e1c00, 0xc0039ca800, 0x0, 0x0, 0x0) pkg/tcpip/transport/tcp/protocol.go:195 +0x1e5 fp=0xc1890824d0 sp=0xc189082378 pc=0xac9765 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*protocol).HandleUnknownDestinationPacket(0xc00033a0f0, 0x0, 0xc003656100, 0x10, 0x549e, 0xc0036560f0, 0x10, 0xc0039c8d00, 0x0) pkg/tcpip/transport/tcp/protocol.go:153 +0x13b fp=0xc189082550 sp=0xc1890824d0 pc=0xac953b gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc0001f3c00, 0x6, 0xc0039c8d00, 0x1) pkg/tcpip/stack/nic.go:834 +0x351 fp=0xc189082658 sp=0xc189082550 pc=0x930611 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).processExtensionHeaders(0xc0024b6800, 0xc008d8538e, 0x28, 0x50, 0xc0039c8d00, 0x0, 0xc002d91354, 0x7) pkg/tcpip/network/ipv6/ipv6.go:1556 +0x1923 fp=0xc189082fd8 sp=0xc189082658 pc=0xb0d063 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleValidatedPacket(0xc0024b6800, 0xc008d8538e, 0x28, 0x50, 0xc0039c8d00, 0xc002d91354, 0x7) pkg/tcpip/network/ipv6/ipv6.go:1190 +0x336 fp=0xc189083250 sp=0xc189082fd8 pc=0xb0b2b6 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleLocalPacket(0xc0024b6800, 0xc0039c8c00, 0x1) pkg/tcpip/network/ipv6/ipv6.go:1126 +0x19f fp=0xc189083470 sp=0xc189083250 pc=0xb0af1f gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).writePacket(0xc0024b6800, 0xc001ef0640, 0xc0039c8c00, 0x6, 0x0, 0x0) pkg/tcpip/network/ipv6/ipv6.go:782 +0x4ae fp=0xc1890836a8 sp=0xc189083470 pc=0xb08ece gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).WritePacket(0xc0024b6800, 0xc001ef0640, 0x4000000006, 0xc0039c8c00, 0x70800228, 0xc008d853b6) pkg/tcpip/network/ipv6/ipv6.go:774 +0x16c fp=0xc189083710 sp=0xc1890836a8 pc=0xb0888c gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc001ef0640, 0x4000000006, 0xc0039c8c00, 0xc000c23b08, 0x0) pkg/tcpip/stack/route.go:462 +0xad fp=0xc189083750 sp=0xc189083710 pc=0x9378ed gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc001ef0640, 0x549e, 0xc002d91930, 0x10, 0x0, 0xc002d91930, 0x10, 0x1fa897900020040, 0x708000000000, 0xc0056415c0, ...) pkg/tcpip/transport/tcp/connect.go:842 +0x285 fp=0xc1890855a0 sp=0xc189083750 pc=0xab80e5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendTCP(0xc0084a9500, 0xc001ef0640, 0x549e, 0xc002d91930, 0x10, 0x0, 0xc002d91930, 0x10, 0x1fa897900020000, 0x708000000000, ...) pkg/tcpip/transport/tcp/connect.go:734 +0xea fp=0xc189085670 sp=0xc1890855a0 pc=0xab74aa gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendSynTCP(0xc0084a9500, 0xc001ef0640, 0x549e, 0xc002d91930, 0x10, 0x0, 0xc002d91930, 0x10, 0x1fa897900020000, 0x708000000000, ...) pkg/tcpip/transport/tcp/connect.go:725 +0xdc fp=0xc189085750 sp=0xc189085670 pc=0xab72fc gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*handshake).start(0xc008dbc980) pkg/tcpip/transport/tcp/connect.go:502 +0x2da fp=0xc189085888 sp=0xc189085750 pc=0xab635a gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).connect(0xc0084a9500, 0xc000000000, 0x0, 0x0, 0xc002a60000, 0x880101, 0x0, 0x0) pkg/tcpip/transport/tcp/endpoint.go:2338 +0x807 fp=0xc189086f30 sp=0xc189085888 pc=0xac33c7 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).Connect(0xc0084a9500, 0xc000000000, 0x0, 0x0, 0x0, 0x0, 0xc002a60000) pkg/tcpip/transport/tcp/endpoint.go:2074 +0x7c fp=0xc189087950 sp=0xc189086f30 pc=0xac2abc gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).Connect(0xc008323f50, 0xc007e6ca80, 0xc001a2ee00, 0x80, 0x80, 0x1, 0x0) pkg/sentry/socket/netstack/netstack.go:607 +0x364 fp=0xc189087a50 sp=0xc189087950 pc=0xb26504 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Connect(0xc007e6ca80, 0x3, 0x20000000, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:277 +0x1c8 fp=0xc189087b00 sp=0xc189087a50 pc=0xdf2088 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc007e6ca80, 0x2a, 0x3, 0x20000000, 0x80, 0x0, 0x0, 0x0, 0xe32a30, 0x1251000, ...) pkg/sentry/kernel/task_syscall.go:104 +0x13c fp=0xc189087c60 sp=0xc189087b00 pc=0x9bc53c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc007e6ca80, 0x2a, 0x3, 0x20000000, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:239 +0x66 fp=0xc189087ce8 sp=0xc189087c60 pc=0x9bd6c6 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc007e6ca80, 0x2a, 0x3, 0x20000000, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:199 +0x98 fp=0xc189087d48 sp=0xc189087ce8 pc=0x9bd2b8 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc007e6ca80, 0x2, 0xc007e6ca80) pkg/sentry/kernel/task_syscall.go:174 +0x15c fp=0xc189087e18 sp=0xc189087d48 pc=0x9bcc5c gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc007e6ca80, 0x13b7460, 0x0) pkg/sentry/kernel/task_run.go:282 +0xca5 fp=0xc189087f60 sp=0xc189087e18 pc=0x9b1825 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc007e6ca80, 0x2ab6) pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc189087fd0 sp=0xc189087f60 pc=0x9b048f runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc189087fd8 sp=0xc189087fd0 pc=0x472821 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:328 +0xfe