Skip to content

[Security][tentative] Medium (attackable): SSZ State Root Omits Keyed Collection Keys #257

@evonide

Description

@evonide

Context

Summit's consensus state stores validator accounts and scheduled validator additions in keyed collections. The keys are consensus-relevant: validator-account keys identify the node public key the account belongs to, and added_validators keys identify the epoch when a scheduled activation should be applied.

The SSZ state tree is used to produce state roots and membership proofs for downstream consumers. Its normal invariant should be that a proof binds both a collection value and the key that gives that value consensus meaning.

Claim

The SSZ tree commits keyed consensus collections as value-only lists, so validator-account and scheduled-activation proofs bind values without binding their node-pubkey or epoch keys.

A malicious SSZ proof or state-root producer can present a state variant where a validator account or scheduled validator addition has a different map key but the committed value sequence is unchanged; because the SSZ tree commits only the keyed collection values, the producer presents the same root for semantically different consensus states and misbinds proofs about validator accounts or activation epochs.

Flow

  1. A proof or state-root producer starts from consensus state containing validator_accounts or added_validators.
  2. The canonical consensus-state codec treats the map keys as part of the serialized state, but the SSZ tree rebuild uses only the ordered values.
  3. The producer can change a validator-account key or scheduled-activation epoch while preserving the value-only positional tree content.
  4. The resulting SSZ root and proof branch remain valid for the value, but the root does not authenticate the key that gives the value its consensus meaning.

Impact

External proof consumers cannot authenticate "this account belongs to pubkey X" or "this activation is for epoch E" from the state root alone. This is distinct from pending-execution-request root omission: these collections are included, but their keys are not.

Root Cause

The SSZ tree models keyed maps as value-only positional lists, while the canonical storage codec treats the keys as consensus state data.

Code

Related Issues/PRs

Related issues cover adjacent keyed collection, validator-key, state-proof, and SSZ root omissions that can weaken identity or proof binding.

Fix

Merkleize keyed collections as key/value pairs or sparse maps, not value-only lists. Include validator node pubkeys in validator-account leaves or proof paths, include added_validators epoch keys in the committed structure, and add tests that change only a map key or scheduled epoch and assert the SSZ state root changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions