You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/derp/derphttp
Simon Law 3ee4c60ff0
cmd/derper: fix mesh auth for DERP servers (#16061)
To authenticate mesh keys, the DERP servers used a simple == comparison,
which is susceptible to a side channel timing attack.

By extracting the mesh key for a DERP server, an attacker could DoS it
by forcing disconnects using derp.Client.ClosePeer. They could also
enumerate the public Wireguard keys, IP addresses and ports for nodes
connected to that DERP server.

DERP servers configured without mesh keys deny all such requests.

This patch also extracts the mesh key logic into key.DERPMesh, to
prevent this from happening again.

Security bulletin: https://tailscale.com/security-bulletins#ts-2025-003

Fixes tailscale/corp#28720

Signed-off-by: Simon Law <sfllaw@tailscale.com>
7 months ago
..
derphttp_client.go cmd/derper: fix mesh auth for DERP servers (#16061) 7 months ago
derphttp_server.go derp/derphttp,ipn/localapi,net/captivedetection: add cache resistance to captive portal detection 10 months ago
derphttp_test.go cmd/derper: fix mesh auth for DERP servers (#16061) 7 months ago
mesh_client.go derp: document the RunWatchConnectionLoop callback gotchas 1 year ago
websocket.go derp/derphttp: don't link websockets other than on GOOS=js 1 year ago
websocket_stub.go derp/derphttp: don't link websockets other than on GOOS=js 1 year ago