Skip to content

fix: reject pending checkpoints in decoded checkpoint artifacts#288

Open
matthias-wright wants to merge 2 commits into
audit-may-2026from
m/pending-checkpoint
Open

fix: reject pending checkpoints in decoded checkpoint artifacts#288
matthias-wright wants to merge 2 commits into
audit-may-2026from
m/pending-checkpoint

Conversation

@matthias-wright

Copy link
Copy Markdown
Collaborator

Addresses #253

Changes:

  • Rejects checkpoint artifacts that decode to consensus state with a non-None pending_checkpoint. This closes the checkpoint recovery path that could carry staged checkpoint data into finalized artifacts.
  • Adds a regression test.

@evonide

evonide commented Jun 5, 2026

Copy link
Copy Markdown

This is a good improvement but seems narrower than #253. It rejects finalized checkpoint artifacts that contain pending_checkpoint which closes the main checkpoint import path.

However, the underlying invariant was that a Checkpoint should not be trusted with digest != sha256(data) and raw Checkpoint::read_cfg / ConsensusState::read_cfg still appear to accept an embedded pending checkpoint without validating that binding. Could we either validate the checkpoint data/digest when decoding/reading Checkpoint or recompute/check the pending checkpoint digest right before the finalizer consumes it?

@matthias-wright

Copy link
Copy Markdown
Collaborator Author

Update(20d3847);

  • Validate checkpoint digest against data on decode

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants