Skip to content

[HIGH] spored bootstrap fails closed in the 7 non-US regions — stale regional buckets have no .sig, and the us-east-1 fallback never triggers #440

Closed

Description

@scttfrdmn

Summary

Found while verifying the v0.93.0 release downstream. In the 7 non-US release regions, a launch with signature verification on (the default) fails to install spored (exit 1) — so the instance runs with no lifecycle daemon (no TTL enforcement, no idle-stop, no DNS). This is a live regression, not specific to v0.93.0.

Evidence (S3, all 11 release regions, spored-linux-amd64)

Region LastModified .sig present
us-east-1 2026-07-23 (v0.93.0) ✅
us-east-2 2026-07-23 ✅
us-west-1 2026-07-23 ✅
us-west-2 2026-07-23 ✅
ca-central-1 2026-06-13 ❌
eu-west-1 2026-06-13 ❌
eu-west-2 2026-06-13 ❌
eu-central-1 2026-06-13 ❌
ap-southeast-1 2026-06-13 ❌
ap-southeast-2 2026-06-13 ❌
ap-northeast-1 2026-06-13 ❌

Root cause — two interacting facts

  1. The release workflow uploads spored to US regions only (.github/workflows/release.yaml:88-96, comment: "US regions only for now. Other regions fall back to us-east-1 … spored still installs everywhere"). So the 7 non-US buckets still hold the June 13 binary and — since they predate the [HIGH] spored bootstrap fails closed in the 7 non-US regions — stale regional buckets have no .sig, and the us-east-1 fallback never triggers #440 KMS-signing rollout — have no .sig.
  2. But the bootstrap's us-east-1 fallback only fires when the regional fetch FAILS (pkg/launcher/bootstrap.go:229-236, curl -f … || fallback). The stale regional object exists, so the regional fetch succeeds → CHECKSUM_URL/SIG_URL point at the regional bucket → the fallback is never reached.

Then signature verification (SPORED_SIG_VERIFY=1, the default per bootstrap.go:118):

SIG_URL="${CHECKSUM_URL%.sha256}.sig"     # regional bucket, no .sig there
if ! curl -f -o /tmp/spored.sig "${SIG_URL}"; then
    echo "❌ Signature file not found … refusing to run an unsigned binary"
    exit 1
fi

→ hard fail. The workflow comment's "spored still installs everywhere" is no longer true once sig-verify became the default: a present-but-unsigned regional binary breaks the fallback assumption and trips the fail-closed check.

Impact

  • HIGH: any spawn launch in ca-central-1 / eu-* / ap-* installs no spored → the instance has no TTL/idle/on-complete enforcement (only the out-of-band ttl-reaper backstop, if deployed for that account, would ever reclaim it — a cost/lifetime risk) and no DNS registration.
  • Even if sig-verify were off, non-US launches would silently run the months-old June spored (pre-spored DNS registration not reaching the DNS Lambda after AuthType: AWS_IAM cutover #435 DNS fixes, etc.), not the current release.

Fix (two parts, both infra/release-process — flagging, not self-fixing)

  1. Publish spored to all 11 regions in the release workflow (extend the BUCKETS list to match defaultRegions in the ttl-reaper / the regions spawn operates in), so every regional bucket has the current signed binary. Backfill v0.93.0 into the 7 stale buckets now.
  2. Make the bootstrap fallback robust to a stale/unsigned regional object, not just a missing one — e.g. if SIG_URL 404s on the regional bucket, fall back to us-east-1 for the binary+sig+checksum together (rather than exit 1). Otherwise a half-populated regional bucket always beats the good fallback.

Interim mitigation: delete the stale spored-linux-* objects from the 7 non-US buckets so the regional fetch fails and the existing us-east-1 fallback kicks in.

Verified read-only against S3 + the bootstrap/release source. No changes made.

Activity

  1. added
    bug
    on Jul 23, 2026
  2. scttfrdmn commented on Jul 23, 2026

    @scttfrdmn
    ContributorAuthor

    Fixed by PR #441 (merged).

    Code fix (both parts):

    1. release.yaml — the spored S3 upload now targets all 11 regions spawn operates in (was 4 US), so no regional bucket serves a stale/unsigned binary after a release.
    2. pkg/launcher/bootstrap.go — the download now iterates candidate sources and, when SPORED_SIG_VERIFY=1, HEAD-probes the .sig before committing to a source. A stale/unsigned regional bucket falls through to the us-east-1 fallback instead of downloading-then-hard-failing. Tested with a sig-aware-fallback assertion + a bash -n syntax check of the generated script.

    Scope confirmed: bootstrap.go is the only download path that does sig verification (hence the only one that hard-failed). The other paths (install-spored.sh/.ps1, cmd/app.go upgrade, pipeline-orchestrator) only risked serving a stale binary — part 1 (all-region publish) fixes that for all of them at the source.

    Remaining = operational (infra account), not code:

    • The merge fixes future releases. The currently-stale 7 non-US buckets still hold the June binary until either the next release runs (re-uploads to all 11) or someone backfills v0.93.0's signed spored into them.
    • Interim mitigation if a non-US launch is needed before then: delete the stale spored-linux-* objects from the 7 non-US spawn-binaries-* buckets so the bootstrap's regional fetch fails and the us-east-1 fallback (now also hardened) kicks in.

    Flagging those infra steps for a maintainer — I didn't touch the buckets or trigger a deploy. Closing as fixed-in-code.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions