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

psbt: handle allocation failures in set_global_tx

Public commit record

What the developer wrote

Authored by Jon Griffiths

45/100 · Thin
psbt: handle allocation failures in set_global_tx
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a memory-management bug in the library's Partially Signed Bitcoin Transaction (PSBT) handling. When the code failed to allocate memory for new transaction inputs or outputs, it could leave behind partially initialized data and might not clean up old input/output records properly. The patch makes sure initialization only happens if memory was actually allocated, and that any old or partially built data is fully freed before returning an error. In practice this is mainly a reliability/hardening fix against out-of-memory conditions rather than a directly exploitable attack path.

Recommended action

Treat as a defensive hardening patch. Reviewers should verify that all callers of psbt_set_global_tx() propagate WALLY_ENOMEM correctly and that no other allocation-failure paths in the PSBT code leave partially initialized structures. Consider backporting to stable branches if the library is used in long-running or resource-constrained services.

Security signals we found

01

Allocation-failure handling added (NULL checks before array initialization)

02

Resource cleanup improved (element-level free before array free)

03

Potential use of uninitialized/freed memory path removed in OOM case

04

No explicit security advisory, CVE, or attribution in commit

Risk score

Why this scored 44/100

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