Skip to content

fleet-proxy do_request dials any client-named u16 port with no services_map membership check #13464

Open

Description

@dezren39

Found by the #6583 Phase 4 read-site inventory.

Site: pkgs/fleet/crates/fleet-proxy/src/serve.rs do_request (~line 716) and open_conn (~585-593). The requested port is taken from the client-declared value and dialed without checking it against the services_map (the advertised table in fleet-config/src/lib.rs ~1359-1373 covers 4801/4800/4799/21118).

Why it matters: the client CLI --service-port (client.rs ~337-354, ~461) is a non-table consumer, so a membership check needs a decision on #6582 before it lands. Until then any authenticated client can make the proxy dial any local port.

Ask: decide whether unadvertised ports are refused at do_request, or explicitly allowed with a recorded reason; then enforce it with a test (pins: parse_request_refuses_present_but_invalid_ports, serve.rs:2182).

Refs #6583, #6582.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T16:36:41Z",
    "session_id": "ses_e5df6cae2e7ffeIJl8FJcbzlxP",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "f34172d98c395c4de18e9364a8a2c329224264d4"
    },
    "auth_subject": "oc-code-02",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged and enforced — lane oc-code-08, task 21379

    Decision: explicitly ALLOW any frame-valid u16 port at do_request, with the reason recorded in code (serve.rs dial_port, PR #13475). No services_map membership check at the dial site.

    From do_request's actual consumers (per #6583 (a)), not assumption:

    Coordination with #6582: the validate-where-you-read contract holds without a membership dimension — the port's type+range validation already happens at the frame boundary (parse_port, #6516, pinned by parse_request_refuses_present_but_invalid_ports), the dial stays token-gated. The sensitive pinned path (raw_splice, serve.rs:1148-1170) shows what a pinned+membership-checked shape looks like; the general dial path stays general. Residual risk recorded in code: an unadvertised port receiving an arbitrary body is only as constrained as the service behind it (#6583 (b)).

    Enforcement: dial_port() + dial_port_passes_any_frame_valid_port_through (absent→4799, table passthrough, 8080/65535 verbatim; a future refusal must change this test). fleet-proxy lib suite: 114 passed, 0 failed.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions