Skip to content

Install, verify and roll back the Rust binary on rigs and the appliance #709

Open

Description

@pithead-developer

What's the problem

With no consumption path, a built binary cannot reach a rig. Setup, upgrade and control-upgrade only know how to check out a tree, and rollback restores only that tree. A binary that a non-root or DynamicUser account can write would turn root oneshot units into a privilege escalation.

What it impacts

First install, upgrade, remote upgrade and rollback on rigs; appliance boot-time setup (RIGFORGE_APPLIANCE=1).

How I found it

Reading the upgrade and control-upgrade code, ADR 0002 and docs/how-it-works.md at ea41133; consumption follows the ADR from #707. Blocked on that ADR and on the Pithead pairing.

How important is it

Blocks any default flip. Security-relevant because root units exec the binary.

Acceptance criteria

  • Setup and upgrade fetch or locate the binary per the ADR, verify it (checksum, version equals VERSION) and refuse to run on mismatch; the check works over the Tor fetch path with no clearnet fallback.
  • The installed binary is root-owned and not writable by any non-root user, and root units refuse to exec it otherwise; a test covers the refusal.
  • Rollback restores the previous binary together with the previous tree.
  • Upgrade from the last Bash-only tag to the first Rust tag and back is exercised in a bench-ci or e2e lane and linked from the PR, or the ledger records not run and why.
  • An appliance-mode smoke runs setup with the binary present and no compiler; boot-time setup time is recorded.
  • make check passes.

Possible solutions

  • Fetch the asset for the checked-out tag at setup and verify against SHA256SUMS before first use.
  • Install to a root-owned directory outside the checkout so a tree checkout cannot replace it.
  • Unknown: whether #710 changes the appliance path.

Activity

  1. added this to the v1.20.0 milestone on Nov 17, 2026
  2. added
    infra
    security
    blocked
    P3-hardening
    size:L
    on Nov 17, 2026
  3. removed
    blocked
    on Nov 17, 2026
  4. added a commit that references this issue on Nov 23, 2026
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

    P3-hardeninginfrasecuritysize:L

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions