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

Merge bitcoin-core/HWI#839: psbt: misc fixes and add remaining BIP 174 and BIP 370 test vectors

Public commit record

What the developer wrote

Authored by Ava Chow

91/100 · Strong
Merge bitcoin-core/HWI#839: psbt: misc fixes and add remaining BIP 174 and BIP 370 test vectors

df8c3f5d4b7e6c6b4856af8bde50c6fc9cf7431c test: add remaining BIP 174 and BIP 370 test vectors (Sjors Provoost)
1ff27e0262f1bffe969ebd68038903930955b20e test: add BIP 370 timelock determination vectors (Sjors Provoost)
498e85a7b31237b57eb110620f62e6bef64fb52e psbt: enforce required locktime bounds (Sjors Provoost)
2a431b8819652473893b0e5dba7feb58ad08a5a5 psbt: reject PSBTv2 input and output fields in PSBTv0 (Sjors Provoost)
8a4052300772adefaf034e498375bd0ccfa18708 psbt: track whether an unsigned tx key was seen (Sjors Provoost)
b34f94a6d5648cf9f4dbce73bfe385fc076cd322 psbt: parse the global unsigned tx without witness data (Sjors Provoost)
f0520e7e813a4a93a617456a82ae39f0e52213d4 psbt: assume final sequence when PSBT_IN_SEQUENCE is omitted (Sjors Provoost)
2db24a2a0839218843db65b0deeb858676c2a186 psbt: set locktime on the transaction, not the PSBT (Sjors Provoost)

Pull request description:

Each fix / hardening commit introduces the test vectors that cover it.

Mostly straight-forward, but `psbt: parse the global unsigned tx without witness data` is worth a closer look. IIUC it catches up with https://github.com/bitcoin/bips/pull/1099.

ACKs for top commit:
achow101:
ACK df8c3f5d4b7e6c6b4856af8bde50c6fc9cf7431c

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

What changed, and why it matters

This commit tightens how the Bitcoin hardware wallet interface library reads PSBT files. It now rejects PSBTv0 files that contain fields only allowed in the newer PSBTv2 format, enforces sensible locktime ranges, and fixes several bugs where the library could build a transaction with the wrong sequence number or locktime. These are defensive correctness fixes rather than a single obvious remote exploit, but they close paths where a malformed or malicious PSBT could confuse a hardware wallet or downstream software.

Recommended action

Review downstream callers that rely on PSBT parsing to ensure they handle the new PSBTSerializationError exceptions gracefully. Update tests and documentation to reflect the stricter PSBTv0/v2 separation. Consider whether any hardware wallet firmware or companion app needs corresponding validation.

Security signals we found

01

Strict PSBT version field validation

02

New locktime bound enforcement

03

Witness-stripped unsigned tx parsing

04

Sequence default fix

05

nLockTime assignment fix

06

Addition of BIP 174/BIP 370 test vectors

Risk score

Why this scored 60/100

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