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

psbt: allow unknowns (global, input and output) to have empty values.

Public commit record

What the developer wrote

Authored by Jon Griffiths

75/100 · Adequate
psbt: allow unknowns (global, input and output) to have empty values.

Thanks to @bitcoisas for reporting and providing the test case.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in how the library reads partially-signed Bitcoin transactions (PSBTs). Previously, if a PSBT contained an unknown extra field with an empty value, the library would store a dangling pointer to a zero-length buffer instead of a proper empty value. This could lead to crashes or memory corruption when the PSBT is later processed. The fix ensures empty unknown values are stored as NULL. A test case with an empty unknown output field was added.

Recommended action

Treat as a low-to-moderate memory-safety fix. Users parsing untrusted PSBTs should upgrade. Review whether similar zero-length buffer handling exists elsewhere in pull_varlength_buff() callers. No CVE or advisory is referenced in the commit; consider requesting one if crash/corruption is reproducible from untrusted input.

Security signals we found

01

Use of potentially dangling pointer for zero-length buffer

02

Memory-safety bug in PSBT deserialization

03

Addition of regression test for malformed/edge-case PSBT input

04

Acknowledgement of external reporter (@bitcoisas)

Risk score

Why this scored 40/100

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