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

tx: fix output clearing size on tx_input_init_alloc failure

Public commit record

What the developer wrote

Authored by Jon Griffiths

73/100 · Adequate
tx: fix output clearing size on tx_input_init_alloc failure

Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a small but real bug in a Bitcoin/Elements transaction library. When creating a new transaction input fails, the code was trying to securely wipe memory using the wrong size: it used the size of a transaction output instead of the size of a transaction input. On most systems this means the clearing is ineffective or incomplete, so secret data (like scripts or witness data) could remain in memory longer than intended. It is a memory-clearing bug, not a direct remote exploit, but it weakens a security safeguard.

Recommended action

Apply the patch. After applying, audit other clear_and_free() and clear() calls in transaction.c for matching object types and sizes, and consider adding static analysis or unit tests that verify clearing sizes match allocation sizes.

Security signals we found

01

Incorrect secure memory wipe size in failure path

02

Potential sensitive data retention (scripts/witness data) in heap

03

Type/size mismatch between allocated object and clearing operation

04

Reported by external researcher

Risk score

Why this scored 44/100

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