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

fuzz: avoid invalid `AddCoin` overwrites

Public commit record

What the developer wrote

Authored by Lőrinc

78/100 · Adequate
fuzz: avoid invalid `AddCoin` overwrites

The coins view fuzzer can call `AddCoin` with `possible_overwrite=false` for an outpoint that already exists unspent in the view, which violates the `AddCoin` caller contract.
Derive `possible_overwrite` from `PeekCoin` so `possible_overwrite=false` is only used when the outpoint is absent.
This matches the approach used by the `coinscache_sim` fuzzer, which derives the overwrite flag from simulated state.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a fuzz test (an automated random-input testing harness) so it no longer violates an internal rule of the coin cache. It does not change production Bitcoin node code, so it cannot directly affect real users or the network. The change makes the test harness follow the same contract as real callers of AddCoin.

Recommended action

No production action required. Treat as a test-quality improvement. Reviewers may optionally verify that the fuzzer now matches the documented AddCoin contract and that no other fuzz targets have similar invalid-call patterns.

Security signals we found

01

Fixes a fuzz-harness contract violation, not a runtime vulnerability

02

No change to consensus, net, wallet, or mempool code

03

No attacker-controlled input path in production code

04

No CVE or security advisory referenced in commit

Risk score

Why this scored 16/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 9/10
Evidence quality 5/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.