panic: runtime error: slice bounds out of range [40:0] goroutine 483740 [running]: panic(0x116ebe0, 0xc0281e5680) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc0b049a320 sp=0xc0b049a258 pc=0x437c65 runtime.goPanicSliceB(0x28, 0x0) GOROOT/src/runtime/panic.go:116 +0xa5 fp=0xc0b049a368 sp=0xc0b049a320 pc=0x435445 gvisor.dev/gvisor/pkg/tcpip/header.IPv6.Encode(0x0, 0x0, 0x0, 0xc0b049a420) pkg/tcpip/header/ipv6.go:274 +0x1e6 fp=0xc0b049a3d0 sp=0xc0b049a368 pc=0x8f6de6 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.addIPHeader(0xc03006e210, 0x10, 0xc03006e200, 0x10, 0xc026aeb500, 0x4000000006, 0x0, 0x0, 0x0, 0xc01aefd090, ...) pkg/tcpip/network/ipv6/ipv6.go:681 +0x205 fp=0xc0b049a480 sp=0xc0b049a3d0 pc=0xb08305 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).WritePacket(0xc000d38800, 0xc01aefd040, 0x5de2004000000006, 0xc026aeb500, 0x1414, 0xc0285d4f86) pkg/tcpip/network/ipv6/ipv6.go:744 +0x85 fp=0xc0b049a4e8 sp=0xc0b049a480 pc=0xb087a5 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc01aefd040, 0x4000000006, 0xc026aeb500, 0x10, 0x5de2) pkg/tcpip/stack/route.go:462 +0xad fp=0xc0b049a528 sp=0xc0b049a4e8 pc=0x9378ed gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc01aefd040, 0x0, 0xc03006e1f0, 0x10, 0x5de2, 0xc03006e1e0, 0x10, 0x140040, 0xe239a79, 0x0, ...) pkg/tcpip/transport/tcp/connect.go:842 +0x285 fp=0xc0b049c378 sp=0xc0b049a528 pc=0xab80e5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.replyWithReset(0xc000310700, 0xc015e1b600, 0x0, 0x0, 0x0) pkg/tcpip/transport/tcp/protocol.go:195 +0x1e5 fp=0xc0b049c4d0 sp=0xc0b049c378 pc=0xac9765 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*protocol).HandleUnknownDestinationPacket(0xc000d2e000, 0x0, 0xc03006e1f0, 0x10, 0x5de2, 0xc03006e1e0, 0x10, 0xc026aeb400, 0x0) pkg/tcpip/transport/tcp/protocol.go:153 +0x13b fp=0xc0b049c550 sp=0xc0b049c4d0 pc=0xac953b gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc000d36380, 0x6, 0xc026aeb400, 0x1) pkg/tcpip/stack/nic.go:834 +0x351 fp=0xc0b049c658 sp=0xc0b049c550 pc=0x930611 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).processExtensionHeaders(0xc000d38800, 0xc030075aae, 0x28, 0x50, 0xc026aeb400, 0x0, 0xc000598674, 0x7) pkg/tcpip/network/ipv6/ipv6.go:1556 +0x1923 fp=0xc0b049cfd8 sp=0xc0b049c658 pc=0xb0d063 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleValidatedPacket(0xc000d38800, 0xc030075aae, 0x28, 0x50, 0xc026aeb400, 0xc000598674, 0x7) pkg/tcpip/network/ipv6/ipv6.go:1190 +0x336 fp=0xc0b049d250 sp=0xc0b049cfd8 pc=0xb0b2b6 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleLocalPacket(0xc000d38800, 0xc026aeb300, 0x1) pkg/tcpip/network/ipv6/ipv6.go:1126 +0x19f fp=0xc0b049d470 sp=0xc0b049d250 pc=0xb0af1f gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).writePacket(0xc000d38800, 0xc01aefcfa0, 0xc026aeb300, 0x6, 0x0, 0x0) pkg/tcpip/network/ipv6/ipv6.go:782 +0x4ae fp=0xc0b049d6a8 sp=0xc0b049d470 pc=0xb08ece gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).WritePacket(0xc000d38800, 0xc01aefcfa0, 0x4000000006, 0xc026aeb300, 0x70800228, 0xc030075ad6) pkg/tcpip/network/ipv6/ipv6.go:774 +0x16c fp=0xc0b049d710 sp=0xc0b049d6a8 pc=0xb0888c gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc01aefcfa0, 0x4000000006, 0xc026aeb300, 0xc000764248, 0x0) pkg/tcpip/stack/route.go:462 +0xad fp=0xc0b049d750 sp=0xc0b049d710 pc=0x9378ed gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc01aefcfa0, 0x5de2, 0xc000598c20, 0x10, 0x0, 0xc000598c20, 0x10, 0xe239a7800020040, 0x708000000000, 0xc000bca5d0, ...) pkg/tcpip/transport/tcp/connect.go:842 +0x285 fp=0xc0b049f5a0 sp=0xc0b049d750 pc=0xab80e5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendTCP(0xc02d158700, 0xc01aefcfa0, 0x5de2, 0xc000598c20, 0x10, 0x0, 0xc000598c20, 0x10, 0xe239a7800020000, 0x708000000000, ...) pkg/tcpip/transport/tcp/connect.go:734 +0xea fp=0xc0b049f670 sp=0xc0b049f5a0 pc=0xab74aa gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendSynTCP(0xc02d158700, 0xc01aefcfa0, 0x5de2, 0xc000598c20, 0x10, 0x0, 0xc000598c20, 0x10, 0xe239a7800020000, 0x708000000000, ...) pkg/tcpip/transport/tcp/connect.go:725 +0xdc fp=0xc0b049f750 sp=0xc0b049f670 pc=0xab72fc gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*handshake).start(0xc03004b180) pkg/tcpip/transport/tcp/connect.go:502 +0x2da fp=0xc0b049f888 sp=0xc0b049f750 pc=0xab635a gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).connect(0xc02d158700, 0xc000000000, 0x0, 0x0, 0xc01a4f0000, 0x880101, 0x0, 0x0) pkg/tcpip/transport/tcp/endpoint.go:2338 +0x807 fp=0xc0b04a0f30 sp=0xc0b049f888 pc=0xac33c7 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).Connect(0xc02d158700, 0xc000000000, 0x0, 0x0, 0x0, 0x0, 0xc00ae50000) pkg/tcpip/transport/tcp/endpoint.go:2074 +0x7c fp=0xc0b04a1950 sp=0xc0b04a0f30 pc=0xac2abc gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).Connect(0xc0125aad70, 0xc030071500, 0xc0281b79a0, 0x1c, 0x1c, 0x1, 0x0) pkg/sentry/socket/netstack/netstack.go:607 +0x364 fp=0xc0b04a1a50 sp=0xc0b04a1950 pc=0xb26504 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Connect(0xc030071500, 0x4, 0x20000080, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:277 +0x1c8 fp=0xc0b04a1b00 sp=0xc0b04a1a50 pc=0xdf2088 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc030071500, 0x2a, 0x4, 0x20000080, 0x1c, 0x0, 0x0, 0x0, 0xe32a30, 0x1251000, ...) pkg/sentry/kernel/task_syscall.go:104 +0x13c fp=0xc0b04a1c60 sp=0xc0b04a1b00 pc=0x9bc53c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc030071500, 0x2a, 0x4, 0x20000080, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:239 +0x66 fp=0xc0b04a1ce8 sp=0xc0b04a1c60 pc=0x9bd6c6 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc030071500, 0x2a, 0x4, 0x20000080, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:199 +0x98 fp=0xc0b04a1d48 sp=0xc0b04a1ce8 pc=0x9bd2b8 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc030071500, 0x2, 0xc030071500) pkg/sentry/kernel/task_syscall.go:174 +0x15c fp=0xc0b04a1e18 sp=0xc0b04a1d48 pc=0x9bcc5c gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc030071500, 0x13b7460, 0x0) pkg/sentry/kernel/task_run.go:282 +0xca5 fp=0xc0b04a1f60 sp=0xc0b04a1e18 pc=0x9b1825 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc030071500, 0x4f70) pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc0b04a1fd0 sp=0xc0b04a1f60 pc=0x9b048f runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0b04a1fd8 sp=0xc0b04a1fd0 pc=0x472821 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:328 +0xfe