Files
Mike Jensen f59067a6aa ipn/localapi: restrict debug-dial-types and debug-log access
The debug-dial-types endpoint dials any caller-supplied address from the root daemon, including via SystemDial and a bare net.Dialer that bypass Tailscale, regressing the corp#39702 fix that serveDial's Dial-Self guard put in place.

Close (but less impactful) the debug-log endpoint was gated on PermitRead, which any local user connecting to the world-writable tailscaled socket passes. Although forged log entries are always possible, we should limit the ability for local users to influence that flow with respects to a given node.

This change restricts debug-dial-types to tailnet-assigned IPs via tsaddr.IsTailscaleIP, so no advertised subnet route can widen the probe back to private LAN ranges.

The log gap is fixed by requiring PermitWrite for debug-log, matching the trust level of every other mutating debug endpoint. Also add a buildfeatures.HasDebug guard to debug-dial-types for parity with serveDebug.

Fixes tailscale/corp#48141
Fixes tailscale/corp#48143

Change-Id: I0c0044b6b44fe7cbfb6734ac18bca3dc36eaffbf
Signed-off-by: Mike Jensen <mikej@tailscale.com>
2026-09-11 14:37:22 -06:00
..