panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xab7c1b] goroutine 2425949 [running]: panic(0x10ad9e0, 0x1bbdc30) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc266d98328 sp=0xc266d98260 pc=0x437c65 runtime.panicmem() GOROOT/src/runtime/panic.go:212 +0x5b fp=0xc266d98348 sp=0xc266d98328 pc=0x435cbb runtime.sigpanic() GOROOT/src/runtime/signal_unix.go:734 +0x173 fp=0xc266d98380 sp=0xc266d98348 pc=0x44f993 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).MaxHeaderLength(...) pkg/tcpip/stack/route.go:278 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc013dc3ea0, 0x4e20, 0xc0022b9734, 0x4, 0x4b94, 0xc0022b9730, 0x4, 0x140040, 0xdd12fd2c, 0x0, ...) pkg/tcpip/transport/tcp/connect.go:831 +0xdb fp=0xc266d9a1d0 sp=0xc266d98380 pc=0xab7c1b gvisor.dev/gvisor/pkg/tcpip/transport/tcp.replyWithReset(0xc0004b8e00, 0xc023206e00, 0x0, 0x0, 0x0) pkg/tcpip/transport/tcp/protocol.go:195 +0x1e5 fp=0xc266d9a328 sp=0xc266d9a1d0 pc=0xac9445 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*protocol).HandleUnknownDestinationPacket(0xc000cc8000, 0x4e20, 0xc0022b9734, 0x4, 0x4b94, 0xc0022b9730, 0x4, 0xc01ec7bd00, 0x0) pkg/tcpip/transport/tcp/protocol.go:153 +0x13b fp=0xc266d9a3a8 sp=0xc266d9a328 pc=0xac921b gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc000cca000, 0x6, 0xc01ec7bd00, 0x0) pkg/tcpip/stack/nic.go:834 +0x351 fp=0xc266d9a4b0 sp=0xc266d9a3a8 pc=0x9308d1 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleValidatedPacket(0xc0004b9500, 0xc00a342488, 0x14, 0x3c, 0xc01ec7bd00, 0x124b876, 0x2) pkg/tcpip/network/ipv4/ipv4.go:1046 +0x8ec fp=0xc266d9ac78 sp=0xc266d9a4b0 pc=0xafb60c gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).HandlePacket(0xc0004b9500, 0xc01ec7bd00) pkg/tcpip/network/ipv4/ipv4.go:836 +0x166 fp=0xc266d9af10 sp=0xc266d9ac78 pc=0xafa6e6 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket(0xc000cca000, 0x0, 0x0, 0x0, 0x0, 0x800, 0xc01ec7bd00) pkg/tcpip/stack/nic.go:749 +0x288 fp=0xc266d9afa0 sp=0xc266d9af10 pc=0x9302a8 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket(0xc0004d65b0, 0x0, 0x0, 0x0, 0x0, 0xc000000800, 0xc01ec7bd00) pkg/tcpip/link/nested/nested.go:59 +0xbe fp=0xc266d9aff8 sp=0xc266d9afa0 pc=0xb9669e gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).DeliverNetworkPacket(0xc0004d65b0, 0x0, 0x0, 0x0, 0x0, 0x800, 0xc01ec7bd00) pkg/tcpip/link/sniffer/sniffer.go:140 +0x94 fp=0xc266d9b040 sp=0xc266d9aff8 pc=0xb970f4 gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePacket(0xc0003140c0, 0xc0022b96e0, 0x4, 0xc0022b96e0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/loopback/loopback.go:89 +0xca fp=0xc266d9b098 sp=0xc266d9b040 pc=0xe1522a gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket(...) pkg/tcpip/link/nested/nested.go:117 gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).WritePacket(0xc0004d65b0, 0xc0022b96e0, 0x4, 0xc0022b96e0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/sniffer/sniffer.go:191 +0x10d fp=0xc266d9b180 sp=0xc266d9b098 pc=0xb9784d gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket(0xc000cca000, 0xc0022b96e0, 0x4, 0xc0022b96e0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:368 +0xfe fp=0xc266d9b218 sp=0xc266d9b180 pc=0x92e29e gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacketBuffer(0xc000cca000, 0xc0022b96e0, 0x4, 0xc0022b96e0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:314 +0xd0 fp=0xc266d9b2c8 sp=0xc266d9b218 pc=0x92dbd0 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).enqueuePacketBuffer(0xc000cca000, 0xc013dc3e00, 0x800, 0x13b1380, 0xc01ec7bc00, 0xc00a34249c, 0x28, 0x28) pkg/tcpip/stack/nic.go:329 +0x25d fp=0xc266d9b418 sp=0xc266d9b2c8 pc=0x92e01d gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket(0xc000cca000, 0xc013dc3e00, 0xc000000800, 0xc01ec7bc00, 0x3c, 0x0) pkg/tcpip/stack/nic.go:307 +0x53 fp=0xc266d9b468 sp=0xc266d9b418 pc=0x92dad3 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket(0xc0004b9500, 0xc013dc3e00, 0xc01ec7bc00, 0xc013dc3e00, 0x0, 0x0) pkg/tcpip/network/ipv4/ipv4.go:495 +0x375 fp=0xc266d9b6a0 sp=0xc266d9b468 pc=0xaf8635 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket(0xc0004b9500, 0xc013dc3e00, 0x4e20004000000006, 0xc01ec7bc00, 0xff800228, 0xc00a34249c) pkg/tcpip/network/ipv4/ipv4.go:445 +0x179 fp=0xc266d9b710 sp=0xc266d9b6a0 pc=0xaf8159 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc013dc3e00, 0x4000000006, 0xc01ec7bc00, 0xc0005d64f8, 0x4e20) pkg/tcpip/stack/route.go:462 +0xad fp=0xc266d9b750 sp=0xc266d9b710 pc=0x937bad gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc013dc3e00, 0x4b94, 0xc0022b96e0, 0x4, 0x4e20, 0xc0022b96e0, 0x4, 0xdd12fd2b00020040, 0xff8000000000, 0xc014d2b260, ...) pkg/tcpip/transport/tcp/connect.go:842 +0x285 fp=0xc266d9d5a0 sp=0xc266d9b750 pc=0xab7dc5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendTCP(0xc166638700, 0xc013dc3e00, 0x4b94, 0xc0022b96e0, 0x4, 0x4e20, 0xc0022b96e0, 0x4, 0xdd12fd2b00020000, 0xff8000000000, ...) pkg/tcpip/transport/tcp/connect.go:734 +0xea fp=0xc266d9d670 sp=0xc266d9d5a0 pc=0xab718a gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendSynTCP(0xc166638700, 0xc013dc3e00, 0x4b94, 0xc0022b96e0, 0x4, 0x4e20, 0xc0022b96e0, 0x4, 0xdd12fd2b00020000, 0xff8000000000, ...) pkg/tcpip/transport/tcp/connect.go:725 +0xdc fp=0xc266d9d750 sp=0xc266d9d670 pc=0xab6fdc gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*handshake).start(0xc1662e3400) pkg/tcpip/transport/tcp/connect.go:502 +0x2da fp=0xc266d9d888 sp=0xc266d9d750 pc=0xab603a gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).connect(0xc166638700, 0xc000000000, 0xc0022b96e0, 0x4, 0x4e20, 0x101, 0x0, 0x0) pkg/tcpip/transport/tcp/endpoint.go:2338 +0x807 fp=0xc266d9ef30 sp=0xc266d9d888 pc=0xac30a7 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).Connect(0xc166638700, 0xc100000000, 0xc0022b96e0, 0x4, 0xc0022b4e20, 0x4, 0xc001af4e20) pkg/tcpip/transport/tcp/endpoint.go:2074 +0x7c fp=0xc266d9f950 sp=0xc266d9ef30 pc=0xac279c gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).Connect(0xc16665afe0, 0xc166a7c000, 0xc0022b96d0, 0x10, 0x10, 0x1, 0x0) pkg/sentry/socket/netstack/netstack.go:607 +0x364 fp=0xc266d9fa50 sp=0xc266d9f950 pc=0xb261e4 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Connect(0xc166a7c000, 0x4, 0x20000000, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:277 +0x1c8 fp=0xc266d9fb00 sp=0xc266d9fa50 pc=0xded4c8 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc166a7c000, 0x2a, 0x4, 0x20000000, 0x10, 0x0, 0x0, 0x0, 0xe2de50, 0x124a400, ...) pkg/sentry/kernel/task_syscall.go:104 +0x13c fp=0xc266d9fc60 sp=0xc266d9fb00 pc=0x9bc5fc gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc166a7c000, 0x2a, 0x4, 0x20000000, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:239 +0x66 fp=0xc266d9fce8 sp=0xc266d9fc60 pc=0x9bd786 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc166a7c000, 0x2a, 0x4, 0x20000000, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:199 +0x98 fp=0xc266d9fd48 sp=0xc266d9fce8 pc=0x9bd378 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc166a7c000, 0x2, 0xc166a7c000) pkg/sentry/kernel/task_syscall.go:174 +0x15c fp=0xc266d9fe18 sp=0xc266d9fd48 pc=0x9bcd1c gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc166a7c000, 0x13b01e0, 0x0) pkg/sentry/kernel/task_run.go:282 +0xca5 fp=0xc266d9ff60 sp=0xc266d9fe18 pc=0x9b18e5 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc166a7c000, 0xbd96) pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc266d9ffd0 sp=0xc266d9ff60 pc=0x9b054f runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc266d9ffd8 sp=0xc266d9ffd0 pc=0x472821 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:328 +0xfe