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

rpcclient: preserve transactions during mempool accept validation

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

83/100 · Strong
rpcclient: preserve transactions during mempool accept validation

In this commit, we validate serialized transactions with a temporary MsgTx instead of decoding back into the caller's object. TestMempoolAcceptAsync now preserves the supplied transactions on both successful validation and local decode errors.

The regression checks transaction contents and input/output identity, rejection without an outbound request, and the transaction bytes and fee limit queued for a valid request.
✓ Specific, 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 bug in btcd's RPC client where a function that checks whether transactions would be accepted by the mempool was accidentally modifying the caller's transaction data during its internal validation. The fix makes the function decode into a temporary copy instead of the caller's original object, so users' transactions remain unchanged. The included tests verify the original transaction is preserved on both success and failure paths.

Recommended action

Treat as a low-severity reliability/defensive fix. Review other RPC client methods for similar in-place deserialization of caller-provided objects. No immediate incident response required unless downstream code was relying on the previous mutation behavior.

Security signals we found

01

Mutation of caller-owned input objects in a public API

02

Potential transaction data corruption or unexpected state change in downstream consumers

03

Regression test added covering both success and failure validation paths

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/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.