Skip to content

bug: panic in coder ssh/vscodessh #15616

Closed
@johnstcn

Description

@johnstcn

Problem

Multiple users have reported the following stack trace when running coder ssh or coder vscodessh:

panic: runtime error: slice bounds out of range [4:0]

goroutine 111 [running]:
golang.org/x/net/route.parseInetAddr(0x80?, {0xc000682484, 0xc000716700?, 0x794})
	/home/runner/go/pkg/mod/golang.org/x/net@v0.30.0/route/address.go:188 +0x267
golang.org/x/net/route.parseAddrs(0x15, 0x8602060, {0xc000682474, 0x28, 0x7a4})
	/home/runner/go/pkg/mod/golang.org/x/net@v0.30.0/route/address.go:408 +0xdd
golang.org/x/net/route.(*wireFormat).parseRouteMessage(0xc000010048, 0x6e23f8a?, {0xc000682418, 0x84, 0x800})
	/home/runner/go/pkg/mod/golang.org/x/net@v0.30.0/route/route_classic.go:70 +0x2fd
golang.org/x/net/route.ParseRIB(0x1, {0xc000682418?, 0xc00047e720?, 0xc0002a4f50?})
	/home/runner/go/pkg/mod/golang.org/x/net@v0.30.0/route/message.go:55 +0x1b3
tailscale.com/net/netmon.(*darwinRouteMon).Receive(0xc000682408)
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20241003034647-02286e537fc2/net/netmon/netmon_darwin.go:59 +0x68
tailscale.com/net/netmon.(*Monitor).pump(0xc000174480)
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20241003034647-02286e537fc2/net/netmon/netmon.go:250 +0x82
created by tailscale.com/net/netmon.(*Monitor).Start in goroutine 1
	/home/runner/go/pkg/mod/github.com/coder/tailscale@v1.1.1-0.20241003034647-02286e537fc2/net/netmon/netmon.go:190 +0x179

What we know so far:

  • User A reports that it occurred after an "ssh timeout". In this case, the user was connected to a VPN (TCP over UDP)
  • User B reports that it occurs when they are working from home and connect to their corporate VPN, and then attempt to connect to their workspace using Visual Studio Code + Plugin (that is, coder vscodessh). Their log also shows the following line right before the panic (redacted):
      net.wgengine: portmapper: saw UPnP type WANIPConnection1 at http://xxx.xxx.xxx.xxx:1900/uubfk/rootDesc.xml; ROUTER MAKE (ROUTER MODEL)
    
  • In both cases, the stacktrace mentions netmon_darwin.go, implying that this is limited to the MacOS build of the CLI.
  • In both cases, the users reportedly were connected to a VPN.

Metadata

Metadata

Assignees

Labels

s1Bugs that break core workflows. Only humans may set this.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions