Skip to content

add_info_from_network: do not swallow exceptions - #10980

Merged
SomberNight merged 1 commit into
masterfrom
add_input_from_network_do_not_ignore_exceptions
Sep 18, 2026
Merged

SomberNight merged 1 commit into
masterfrom
add_input_from_network_do_not_ignore_exceptions

Conversation

@ecdsa

@ecdsa ecdsa commented Sep 18, 2026

Copy link
Copy Markdown
Member

An attacker can provide a witness_utxo whose value disagrees with the real previous transaction. That would raise PSBTInputConsistencyFailure, which is swallowed because it is not a NetworkException.

This would lead us to sign a tx with the wrong input amount. (no fund loss: the tx is invalid under BIP143)

@ecdsa
ecdsa force-pushed the add_input_from_network_do_not_ignore_exceptions branch from 7aa6045 to 118b8e7 Compare September 18, 2026 14:46
An attacker can provide a witness_utxo whose value disagrees  with
the real previous transaction. That would raise PSBTInputConsistencyFailure,
which is swallowed because it is not a NetworkException.

This would lead us to sign a tx with the wrong input amount.
(no fund loss: the tx is invalid under BIP143)
@ecdsa
ecdsa force-pushed the add_input_from_network_do_not_ignore_exceptions branch from 118b8e7 to 3f67b21 Compare September 18, 2026 14:59
@ecdsa
ecdsa marked this pull request as ready for review September 18, 2026 15:08

@SomberNight SomberNight left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@SomberNight
SomberNight merged commit bb9d328 into master Sep 18, 2026
20 of 21 checks passed
@ecdsa
ecdsa deleted the add_input_from_network_do_not_ignore_exceptions branch September 18, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants