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

psbt: compact witness utxo scripts after parsing

Public commit record

What the developer wrote

Authored by Boris Nagaev

80/100 · Strong
psbt: compact witness utxo scripts after parsing

wire.ReadTxOut returns PkScript slices backed by its internal 4 MiB
script slab. PSBT inputs keep parsed WitnessUtxo values, so small
scripts could otherwise keep the whole slab live.

Copy the script before storing the TxOut and assert the parsed witness
script has compact capacity.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a memory-usage issue, not a security vulnerability. When reading PSBT data, the code was keeping a pointer to a large 4 MiB internal memory block even for tiny scripts. The patch copies the small script into its own compact memory slice so the large block can be released. It does not fix a bug that lets an attacker steal funds, crash the program, or bypass validation.

Recommended action

Treat as a routine memory-usage improvement. No security response is required. If backporting, do so for resource efficiency rather than vulnerability mitigation.

Security signals we found

01

memory retention reduction

02

no input validation change

03

no cryptographic change

04

no consensus rule change

05

test assertion added for capacity

Risk score

Why this scored 25/100

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