Skip to content

security: spored signature is not bound to version or name, and its sha256 comes from the same bucket, so any previously signed spored can be substituted #1597

Closed

Description

@scttfrdmn

From the pre-1.0 security audit (spore-host/spore-host#649, 2026-11-11), audit id supply-7. Verified: confirmed, severity low (reviewer said low).

Where: pkg/sporedinstall/install.go:333 (at origin/main on 2026-11-11)

Evidence

The release signs the bare file digest: openssl dgst -sha256 -binary "$out/$name" > $name.digest; aws kms sign --message-type DIGEST (release.yaml:189-196). The installer fetches ${chosen}/${binary}.sha256 from the same base (install.go:333) and verifies openssl dgst -sha256 -verify ... "$tmp" over the file alone (install.go:366). The body comment at install.go:327-328 admits the checksum 'is served from the same bucket as the binary'. By contrast, the bootstrap body's sha256 is carried in user data (bootstrap.go:933).

Scenario

Someone who can write to any one of the 11 public spawn-binaries- buckets (a misconfigured bucket policy, or the release role) can put an older signed spored with a known vulnerability, or the linux build under another arch name, at spawn/versions//. Instances in that region install it and the signature check passes, quietly undoing agent security fixes.

Verifier

spawn/.github/workflows/release.yaml:189-196 signs only the file digest. spawn/pkg/sporedinstall/install.go:333 fetches .sha256 from the same base, and :366 verifies the signature over the file bytes alone, with no version or name binding and no post-install version check. Anyone who can write to the bucket could replay an older signed spored, which would be a downgrade. Swapping in a different arch would just fail to run. This needs write access to a release bucket, so low.

Suggested fix

Bake each spored's expected sha256 into the release spawn (it is known before GoReleaser runs; pass it by ldflag) and check it in user data as the body is checked. Alternatively, sign a small manifest {name, version, arch, sha256} instead of the bare digest.

Deployed-state check

Bucket policies of the 11 spawn-binaries-* buckets: only the release role may write spawn/versions/* and spawn/current/*.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions