0xMiden / 0xMiden/protocol

bug: ProposedBlock::Deserializable skips all validation in read_from validation bypass via deserialization

オープン
#3,185 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 23時間
マージ済み PR(30日)
110

説明

### Packages versions

miden-protocol: next branch

### Bug description

ProposedBlock::read_from constructs the struct directly without calling new_at, so all validation is skipped during deserialization.

This is unlike ProposedBatch::read_from which correctly calls new_batch_inner.

Skipped checks: duplicate batches, timestamp monotonicity, batch expiration, chain consistency, NoteTracker (duplicate notes, circular deps, unauthenticated note auth), nullifier witnesses, account update consistency.

Impact: A corrupted/malicious serialized block passes deserialization and only fails later (or not at all), causing late failure and confusing errors.

### How can this be reproduced?

1. Serialize a valid ProposedBlock
2. Corrupt it (e.g., duplicate a batch ID)
3. Deserialize with read_from_bytes()
4. It succeeds validation skipped!
5. Only fails later when into_header_and_body() is called

ProposedBatch does this correctly by calling new_batch_inner in read_from. ProposedBlock should do the same with new_at.

### Relevant log output

```shell
No logs structural code issue.
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。