Skip to content

Tunnel: the worker's reverse listener is a Unix socket only Simlock's user can reach #1182

Closed as not planned

Description

@V3RON

Part of #1110.

Scope

A tunnel's worker-side listener can no longer be reached by other leases' devices or local processes. Today, while a reverse tunnel is open, any connection that reaches the worker's loopback port reaches the holder's tunnelled port: an emulator through 10.0.2.2:<port>, or any device through an adb reverse set with device.exec. This is documented on the remote-agents page. After this task it is closed.

In short

The worker listens on a Unix socket in a directory only Simlock's user can open (mode 0700, socket 0600), not on a TCP loopback port in 47000-47999. It points the rule there with adb reverse tcp:<device port> localfilesystem:<path>. device.exec refuses an adb reverse whose target is that directory. A user would notice if this goes wrong: simlock tunnel reverse fails to set a rule on a device whose adb does not take localfilesystem: targets.

Open for the spec session:

  • Does every supported adb take localfilesystem: as a reverse target, emulators and phones alike?
  • Does the 47000-47999 reservation, and the start sweep that reads it, go away or stay for old rules?
  • ADR 0054 Decision 4 changes, so this needs an ADR amendment.

Technical spec

To be written in a spec session.

Depends on

Written by an agent.

Activity

  1. added
    task:draft
    on Nov 1, 2026
  2. V3RON commented on Nov 3, 2026

    @V3RON
    ContributorAuthor

    Closing as not planned (maintainer decision, 2026-11-03).

    The Unix socket would close little:

    • An emulator reaches every loopback port on the worker through 10.0.2.2, not only the tunnel listener.
    • Processes running as Simlock's own user, agents on the worker included, could still open the socket.
    • Tunnels are off unless an operator turns on capabilities.tunnel.enabled, and the remote-agents page documents the exposure (ADR 0054 Decision 4).
    • adb on Windows has no localfilesystem: reverse target, so Windows workers would keep the TCP listener anyway.

    Mutually untrusted lease holders need OS-level isolation, as the drivers manual already says.

    Written by an agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    task:draft

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions