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

Merge ElementsProject/elements#1593: Fix RPC return errors for psbt and invalid rangeproofs

Public commit record

What the developer wrote

Authored by merge-script

100/100 · Strong
Merge ElementsProject/elements#1593: Fix RPC return errors for psbt and invalid rangeproofs

a9db3b1c1fce0288f47dac21915f9fceaaeb231a Add startup warning for signed-blocks parent chain (Tom Trevethan)
246c5ab63adb7c3a3f672992109e227ab668d096 Add virtual desctructor to CChainParams (Tom Trevethan)
779e71f545d82d706bd5bec083261dfa03c582ce PAK enforcement on confidential nAsset (Tom Trevethan)
ffd91c0512eddcb58b74489b3c07939470f3e79e PartiallySignedTransaction::SetupFromTx indexes vtxinwit checked (Tom Trevethan)
84a05e35aa94bf86b80b9e27ba4e25809068d666 check pubkey validity in tweakfedpegscript to prevent assert failure (Tom Trevethan)
3a8dec1258eceac38e110c20fd7b5d7a04d4c536 Return error for psbt if explicit amounts/assets deleted (Tom Trevethan)
4e5ca94f6b6ce0eecb7dc1fa65780d9a724f67bb Return error for invalid rangproof amounts (Tom Trevethan)

Pull request description:

Fixes for a number of issues with RPC errors for invalid PSBTs and amounts/rangeproofs.

ACKs for top commit:
delta1:
ACK a9db3b1c1fce0288f47dac21915f9fceaaeb231a; tested locally

Tree-SHA512: bf35348a5fad30e0f1f2b3caa2ec35ec521b583155e97f3a5f2504a3d70b41677f215fc01b28ccd30706ff5a7d021afb74c110a2c8f270942f5cba344544a55d
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This update fixes several ways that malformed transaction data could crash Elements nodes or trick wallet users into signing bad transactions. The main changes turn internal 'assert' crashes into proper error returns when creating confidential range proofs, add checks for missing or tampered PSBT output data, reject peg-in witness data that is the wrong size or badly encoded, enforce that peg-out outputs must not hide their asset type, and prevent a bad federation script from causing an assertion failure. One change also adds a startup warning about a known limitation with signed-blocks parent chains.

Recommended action

Treat this as a security-hardening patch and include it in the next maintenance release. Nodes and wallets should upgrade to avoid the denial-of-service and transaction-malleability paths described. No emergency response appears necessary, but downstream integrators using blinded PSBTs or peg-ins should verify error handling around the new BlindingStatus/PSBTError codes.

Security signals we found

01

assert-to-error conversion in rangeproof generation

02

PSBT explicit output data now required before signing blinded outputs

03

peg-in witness stack length and deserialization hardening

04

confidential peg-out asset rejected from mempool

05

fedpegscript pubkey validity check to prevent assert failure

06

PSBT peg-in witness index bounds check

07

new BlindingStatus and PSBTError enumerants for failure reporting

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/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.