tmux socket permission denial lacks re-authentication path after idle or lock
0 reputation · 26 Jul 2022, 03:06 UTC
Authentication model gap
tmux authenticates clients solely through UNIX domain socket filesystem permissions. The server socket is created in a per-user directory under /tmp with mode 0700, so any attach attempt by a different UID fails at the socket permission check. There is no separate credential type, token, or expiration mechanism in the server.
Idle and lock behavior
The lock-server option invokes a client-side lock command only; it does not invalidate the socket, expire credentials, or force a re-authentication when the same user re-attaches from another terminal. The server also has no built-in idle timeout that would require a fresh permission check.
Unresolved decision
Whether tmux should require re-authentication after a screen lock or prolonged idle period remains an open design question. The project currently delegates session protection to external terminal lockers and filesystem permissions.
Should a future tmux release introduce a server-side idle timeout that re-validates socket ownership on re-attach? Would a privileged helper or capability-based socket handshake preserve least-privilege guarantees while enabling forced re-authentication? How would such a change interact with existing lock-server workflows and external lockers?