panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x928566] goroutine 2440986 [running]: panic(0x1097d60, 0x1ba9be0) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc1954978e0 sp=0xc195497818 pc=0x437c65 runtime.panicmem() GOROOT/src/runtime/panic.go:212 +0x5b fp=0xc195497900 sp=0xc1954978e0 pc=0x435cbb runtime.sigpanic() GOROOT/src/runtime/signal_unix.go:734 +0x173 fp=0xc195497938 sp=0xc195497900 pc=0x44f993 gvisor.dev/gvisor/pkg/tcpip/stack.(*PacketBuffer).headerView(0x0, 0x2, 0x0, 0x0, 0x0) pkg/tcpip/stack/packet_buffer.go:274 +0x26 fp=0xc195497980 sp=0xc195497938 pc=0x928566 gvisor.dev/gvisor/pkg/tcpip/stack.PacketHeader.View(...) pkg/tcpip/stack/packet_buffer.go:364 gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*protocol).HandleUnknownDestinationPacket(0xc00000e748, 0x0, 0x0, 0x0, 0x0, 0xc1148e019c, 0x4, 0x0, 0x0) pkg/tcpip/transport/udp/protocol.go:82 +0x65 fp=0xc195498d18 sp=0xc195497980 pc=0xadf525 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc000cb0000, 0x11, 0xc11488c900, 0x0) pkg/tcpip/stack/nic.go:840 +0x371 fp=0xc195498e20 sp=0xc195498d18 pc=0x9262b1 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleValidatedPacket(0xc000c88700, 0xc1141b31f8, 0x14, 0x1c, 0xc11488c900) pkg/tcpip/network/ipv4/ipv4.go:1040 +0x858 fp=0xc1954995e8 sp=0xc195498e20 pc=0xaf3198 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).HandlePacket(0xc000c88700, 0xc11488c900) pkg/tcpip/network/ipv4/ipv4.go:839 +0x139 fp=0xc195499880 sp=0xc1954995e8 pc=0xaf2359 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket(0xc000cb0000, 0x0, 0x0, 0x0, 0x0, 0x800, 0xc11488c900) pkg/tcpip/stack/nic.go:749 +0x288 fp=0xc195499910 sp=0xc195499880 pc=0x925c68 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket(0xc0002f7650, 0x0, 0x0, 0x0, 0x0, 0xc100000800, 0xc11488c900) pkg/tcpip/link/nested/nested.go:59 +0xbe fp=0xc195499968 sp=0xc195499910 pc=0xb8ce7e gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).DeliverNetworkPacket(0xc0002f7650, 0x0, 0x0, 0x0, 0x0, 0x800, 0xc11488c900) pkg/tcpip/link/sniffer/sniffer.go:143 +0x94 fp=0xc1954999b0 sp=0xc195499968 pc=0xb8d994 gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePacket(0xc0005fe130, 0xc1148e0138, 0x4, 0xc1148e0138, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/loopback/loopback.go:89 +0xca fp=0xc195499a08 sp=0xc1954999b0 pc=0xe0618a 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(0xc0002f7650, 0xc1148e0138, 0x4, 0xc1148e0138, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/sniffer/sniffer.go:192 +0x10d fp=0xc195499af0 sp=0xc195499a08 pc=0xb8de2d gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket(0xc000cb0000, 0xc1148e0138, 0x4, 0xc1148e0138, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:368 +0xfe fp=0xc195499b88 sp=0xc195499af0 pc=0x923c5e gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacketBuffer(0xc000cb0000, 0xc1148e0138, 0x4, 0xc1148e0138, 0x4, 0x0, 0x0, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:314 +0xd0 fp=0xc195499c38 sp=0xc195499b88 pc=0x923590 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).enqueuePacketBuffer(0xc000cb0000, 0xc11220eb40, 0x800, 0x139fe20, 0xc11488c800, 0xc1141b320c, 0x8, 0x8) pkg/tcpip/stack/nic.go:329 +0x25d fp=0xc195499d88 sp=0xc195499c38 pc=0x9239dd gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket(0xc000cb0000, 0xc11220eb40, 0xc100000800, 0xc11488c800, 0x1c, 0x0) pkg/tcpip/stack/nic.go:307 +0x53 fp=0xc195499dd8 sp=0xc195499d88 pc=0x923493 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket(0xc000c88700, 0xc11220eb40, 0xc11488c800, 0xc11220eb00, 0x0, 0x0) pkg/tcpip/network/ipv4/ipv4.go:495 +0x375 fp=0xc19549a010 sp=0xc195499dd8 pc=0xaf0295 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket(0xc000c88700, 0xc11220eb40, 0x4000000011, 0xc11488c800, 0xc11220eb40, 0xc0044ad601) pkg/tcpip/network/ipv4/ipv4.go:445 +0x179 fp=0xc19549a080 sp=0xc19549a010 pc=0xaefdb9 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc11220eb40, 0x4000000011, 0xc11488c800, 0xc0007ba868, 0x8) pkg/tcpip/stack/route.go:462 +0xad fp=0xc19549a0c0 sp=0xc19549a080 pc=0x92d46d gvisor.dev/gvisor/pkg/tcpip/transport/udp.sendUDP(0xc11220eb40, 0xc19549b650, 0x1, 0x1, 0x1, 0x1004e22833d, 0x13a75f0, 0xc1141f7500, 0x0, 0x0, ...) pkg/tcpip/transport/udp/endpoint.go:852 +0x3c5 fp=0xc19549b4e0 sp=0xc19549a0c0 pc=0xadb7c5 gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).write(0xc1128fb900, 0x13abd80, 0xc1148ee7d0, 0xc113abd020, 0x0, 0x0, 0x0, 0x0) pkg/tcpip/transport/udp/endpoint.go:579 +0x688 fp=0xc19549b678 sp=0xc19549b4e0 pc=0xad9dc8 gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).Write(0xc1128fb900, 0x13abd80, 0xc1148ee7d0, 0xc113abd020, 0xc114000000, 0x4, 0xc1141f4e22, 0x20000002) pkg/tcpip/transport/udp/endpoint.go:431 +0x68 fp=0xc19549b6c8 sp=0xc19549b678 pc=0xad9568 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).SendMsg(0xc11488f250, 0xc1141f7500, 0x13c3ed0, 0xc114fba000, 0x0, 0x1, 0x20000140, 0x1, 0x100, 0xc1148e0140, ...) pkg/sentry/socket/netstack/netstack.go:2859 +0x209 fp=0xc19549b838 sp=0xc19549b6c8 pc=0xb2a589 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.sendTo(0xc1141f7500, 0x3, 0x20000140, 0x1, 0x40141, 0x20000040, 0xc100000010, 0x0, 0x0, 0x0) pkg/sentry/syscalls/linux/vfs2/socket.go:1127 +0x495 fp=0xc19549baa8 sp=0xc19549b838 pc=0xde4a95 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.SendTo(0xc1141f7500, 0x3, 0x20000140, 0x1, 0x40141, 0x20000040, 0x10, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:1140 +0x71 fp=0xc19549bb08 sp=0xc19549baa8 pc=0xde4ed1 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc1141f7500, 0x2c, 0x3, 0x20000140, 0x1, 0x40141, 0x20000040, 0x10, 0xe1e3ec, 0x1233980, ...) pkg/sentry/kernel/task_syscall.go:102 +0x13c fp=0xc19549bc68 sp=0xc19549bb08 pc=0x9b489c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc1141f7500, 0x2c, 0x3, 0x20000140, 0x1, 0x40141, 0x20000040, 0x10, 0x20000040, 0x10) pkg/sentry/kernel/task_syscall.go:237 +0x66 fp=0xc19549bcf0 sp=0xc19549bc68 pc=0x9b5a66 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc1141f7500, 0x2c, 0x3, 0x20000140, 0x1, 0x40141, 0x20000040, 0x10, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:197 +0x98 fp=0xc19549bd50 sp=0xc19549bcf0 pc=0x9b5618 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc1141f7500, 0x2, 0xc1141f7500) pkg/sentry/kernel/task_syscall.go:172 +0x15c fp=0xc19549be20 sp=0xc19549bd50 pc=0x9b4fbc gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc1141f7500, 0x139eca0, 0x0) pkg/sentry/kernel/task_run.go:282 +0xca5 fp=0xc19549bf60 sp=0xc19549be20 pc=0x9a9325 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc1141f7500, 0x2d31) pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc19549bfd0 sp=0xc19549bf60 pc=0x9a7f8f runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc19549bfd8 sp=0xc19549bfd0 pc=0x472821 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:328 +0xfe