AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

Merge rust-bitcoin/rust-bitcoin#6789: fuzz: fix p2p commands master and 0.32 divergence

Public commit record

What the developer wrote

Authored by Andrew Poelstra

100/100 · Strong
Merge rust-bitcoin/rust-bitcoin#6789: fuzz: fix p2p commands master and 0.32 divergence

77923a0cb5f49ed1807067028a9cd87a68df2c78 fuzz: add regression tests for master-only p2p commands (satsfy (Renato Britto))
b38bcaaf7fd4ea7b71f3ecb7f025e7dc206719fa fuzz: run the compare_consensus_encoding tests (satsfy (Renato Britto))
1dd0a4b57cf5ec53d632988630e14dbec6f3625d fuzz: skip master exclusive V1NetworkMessage commands (satsfy (Renato Britto))

Pull request description:

Fixes https://github.com/rust-bitcoin/rust-bitcoin/issues/6784 (issue closed automatically but shouldn't have, I'll follow up with a PR for that).

The `compare_consensus_encoding` target panics when 0.32 decodes something master rejects. Bitcoin 0.32 stores unknown commands as `NetworkMessage::Unknown` without parsing, never fail. Master decodes `sendtxrcncl` and `feature` typed and rejects empty payloads.

Commits:
1. Skip the comparison for those two, keyed on the command in the V1 header
2. Gated the test module on `test` alone because `cfg(all(test, fuzzing))` could never run (optional, I may have misunderstood here).
3. Make both crash inputs into regression tests


ACKs for top commit:
apoelstra:
ACK 77923a0cb5f49ed1807067028a9cd87a68df2c78; successfully ran local tests


Tree-SHA512: 738bc34909d0523e74adc9702dbc68c42b2623cb3391d5cba4023382eec734bbcc16067e90753911e5121138772efd3aaf1cf4f338bb60b42874c2aecbce44ef
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This is a fuzz-test-only fix. It changes a test harness so it skips comparing two newer Bitcoin P2P network commands ('feature' and 'sendtxrcncl') between the current master code and an older 0.32 release. The older release stores unknown commands as raw data, while the newer code parses and can reject them. The fix prevents the fuzz test from panicking on this expected difference. It does not change any production library code.

Recommended action

No production action needed. Reviewers can verify the skip list matches the documented master-only commands and that the regression tests exercise the skip paths.

Security signals we found

01

Fuzz harness panic on expected version divergence

02

Test-only change, no production code modified

03

Comparison between master and 0.32 behavior for new P2P commands

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.