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

Merge bitcoin/bitcoin#35728: rpc: Properly throw on internal I/O errors in GetTransaction

Public commit record

What the developer wrote

Authored by Ryan Ofsky

91/100 · Strong
Merge bitcoin/bitcoin#35728: rpc: Properly throw on internal I/O errors in GetTransaction

fad49fd81fcffd1dd9f40320a239881a0881be25 Add doc/release-notes-35728.md (MarcoFalke)
fa7d278aad832250e2c1e07ef10afdffee36da4e refactor: Use GetTransaction in ProcessPSBT (MarcoFalke)
fa32e607531c712dab33a712127e473086e32f9f rpc: Properly throw on internal FindTx IO errors in ProcessPSBT and GetTransaction (MarcoFalke)
faaf4a751c68d57ea21d40fbd66dcbbc69abbbac test: Add test to check RPCs throw on IO errors (MarcoFalke)
fad44f18b88fddae160bffb672e12c01c92d6a7f rpc: Return proper error messages from getrawtransaction (MarcoFalke)
fa5ad60c32860786251afc9b764deeb9b5fdcf62 test: Add test for getrawtransaction block read errors (MarcoFalke)

Pull request description:

Currently the GetTransaction return value is a nullable transaction
pointer, where nullptr represents two different outcomes: I/O error and
missing tx.

Reporting a confirmed transaction as missing is wrong, so properly
return an error instead.

ACKs for top commit:
furszy:
ACK fad49fd81fcffd1dd9f40320a239881a0881be25
l0rinc:
ACK fad49fd81fcffd1dd9f40320a239881a0881be25
musaHaruna:
re-ACK [fad49fd](https://github.com/bitcoin/bitcoin/commit/fad49fd81fcffd1dd9f40320a239881a0881be25)
ryanofsky:
Code review ACK fad49fd81fcffd1dd9f40320a239881a0881be25. Since last review, `WarnAndThrowErr` takes the format string and arguments directly, and the release note wording is updated. Thanks!

Tree-SHA512: 6ed11f58a05c46e300412c8db18ae49308af386449fe417a1c3c7de61b3ad85341747b5b4af331d6fa956d55fe039c8fffd9da8f080090f514df11acdcfbcb66
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This Bitcoin Core update fixes a bug where several RPC commands and one REST endpoint would incorrectly tell users a confirmed transaction was missing, when in fact the software had hit a disk-read or index corruption problem. After the patch, these interfaces return a clear internal error instead of a misleading 'not found' result. It is a correctness/reliability fix rather than a remote-code-execution style vulnerability.

Recommended action

Treat as a reliability/integrity fix worth including in release notes. No immediate emergency response is required, but node operators and integrators should be aware that RPCs may now return internal errors instead of 'not found' when local data is corrupt or unreadable. Review dependent services that assume 'not found' responses are authoritative.

Security signals we found

01

Incorrect error handling conflated I/O/index corruption with absent transaction

02

Confirmed transactions could be reported as missing, misleading wallets and downstream systems

03

PSBT processing could silently continue without required previous transaction data

04

Patch adds explicit exception throwing and regression tests for simulated disk errors

Risk score

Why this scored 43/100

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