tailscale/ipn/localapi
Harry Harpham fa542426e5 ipn,ipn/localapi: require local admin to serve Unix domain sockets
This resolves a local privilege escalation (LPE). Prior to this change,
a non-admin user could utilize serve to access local Unix sockets they
otherwise should not be able to access. For example,

  tailscale serve --http 80 unix:/var/run/docker.sock

would give the user access to the Docker socket (usually root only).
This works because tailscaled has root access and implements the proxy
to the socket (see also: 'the confused deputy problem').

We resolve the problem by refusing to serve Unix targets altogether
unless instructed to by a root user.

Thanks to Tim Sageser (dtrsecurity) for this report.

Fixes tailscale/corp#41998

Signed-off-by: Harry Harpham <harry@tailscale.com>
2026-06-03 09:45:02 -06:00
..
cert.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
debug.go ipn/ipnlocal, control/controlclient: process node adds/removes in constant time 2026-05-21 09:26:19 -07:00
debugderp.go ipn/localapi,tstest/natlab: fix debug derp TLS check for sha256-raw CertName 2026-06-02 12:02:40 -07:00
disabled_stubs.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
localapi_drive.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
localapi_test.go ipn,ipn/localapi: require local admin to serve Unix domain sockets 2026-06-03 09:45:02 -06:00
localapi.go ipn/ipnlocal: add back a watchdog after earlier removal from engine 2026-06-02 11:57:12 -07:00
pprof.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
serve.go ipn,ipn/localapi: require local admin to serve Unix domain sockets 2026-06-03 09:45:02 -06:00
syspolicy_api.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tailnetlock.go ipn,tka: improve Tailnet Lock logs 2026-04-01 17:08:12 +01:00