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

psbt: fix check for short buffers

Public commit record

What the developer wrote

Authored by Jon Griffiths

60/100 · Adequate
psbt: fix check for short buffers

Thanks to @erickcestari for reporting and suggesting a fix.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in how the library reads compact size numbers from PSBT (Partially Signed Bitcoin Transaction) data. Before the fix, the code could read past the end of a short input buffer when checking how many bytes a variable-length integer needs. The fix adds a check that at least one byte is available before asking how long the integer is. This is a memory-safety bug that could cause crashes or undefined behavior when parsing malformed PSBT data.

Recommended action

Treat as a security-relevant memory-safety fix. Review whether the same pattern exists elsewhere in the codebase, backport to supported branches, and run the new short-bytes test vectors through fuzzing/ASan to confirm no further out-of-bounds reads.

Security signals we found

01

Out-of-bounds read in variable-length integer parsing

02

Short/truncated input buffer not validated before length inspection

03

New negative test case added for short PSBT bytes

04

Memory safety issue in PSBT deserialization path

05

Fix credited to external reporter @erickcestari

Risk score

Why this scored 61/100

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