0xMiden / 0xMiden/node

bug: block proofs are never cryptographically verified in `apply_proof`

Offen
#2,383 5 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @sergerad Auf GitHub ansehen
blocked
Vorherrschende Sprache
Rust
Sterne
104
Forks
138
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
56

Beschreibung

## Summary

`verify_block_proof` in `crates/store/src/state/apply_proof.rs` only deserializes the proof bytes it never performs cryptographic verification. Any byte sequence that parses as a valid `BlockProof` struct is accepted and written to disk.

## Code

```rust
// crates/store/src/state/apply_proof.rs
fn verify_block_proof(_block_num: BlockNumber, proof_bytes: &[u8]) -> anyhow::Result<()> {
let _proof =
BlockProof::read_from_bytes(proof_bytes).context("failed to deserialize block proof")?;

// TODO: perform verification.
Ok(())
}
```

## Impact

- This function is called from `apply_proof`, which is used by both the sequencer's `ProofScheduler` and the full-node's `ProofSync`
- Unverified proofs are persisted to disk and broadcast to all replica subscribers via `proof_cache`
- An attacker can submit a structurally valid but cryptographically invalid proof and it will be accepted

## Expected behavior

The proof should be cryptographically verified before returning `Ok(())`.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.