Gesa Stupperich db52827a83 ssh/tailssh: guard access to c.info and c.localUser
This moves the info and localUser of a conn under the guard of the
conn's mu in order to prevent races between the fields being written
in clientAuth and it being read. Given that info and localUser are
pointers this doesn't strictly prevent individual fields from being
written without the mutex being held. The reason I consider that
good enough is that the code effectively treats both fields as
immutable once set. I have added defensive nil checks everywhere,
however, which might be overly conservative.

Updates tailscale/corp#36268

Signed-off-by: Gesa Stupperich <gesa@tailscale.com>
2026-02-10 11:19:36 +00:00
..