Repository navigation
Refuse PSBTs that made lightningd abort in libwally - #9680
Open
kwsantiago wants to merge 2 commits into
Open
kwsantiago wants to merge 2 commits into
kwsantiago wants to merge 2 commits into
Conversation
A version 2 PSBT without PSBT_GLOBAL_TX_MODIFIABLE, or without its inputs or outputs bit, makes libwally refuse to add one, and psbt_add_output and psbt_append_input assert on that. A signer clears the bits once adding would invalidate its signature, so refuse rather than override them. Changelog-Fixed: `addpsbtoutput` and `addpsbtinput` refuse a version 2 PSBT that does not allow adding outputs or inputs, instead of crashing lightningd.
One input requiring a time locktime and another a height locktime leave a version 2 PSBT no valid locktime, and psbt_txid asserts when it cannot extract the transaction. Refuse such a PSBT when parsing it, which covers every RPC parameter and plugin reply. Changelog-Fixed: A PSBT whose inputs require both a time and a height locktime is refused, instead of crashing lightningd in `fundchannel_complete`.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two PSBTs an RPC caller can pass make lightningd abort on a libwally assertion. A version 2 PSBT that does not allow adding outputs or inputs (no
PSBT_GLOBAL_TX_MODIFIABLE, or without the relevant bit) abortsaddpsbtoutputinpsbt_add_outputandaddpsbtinputinpsbt_append_input. A version 2 PSBT where one input requires a time locktime and another a height locktime has no valid locktime, andfundchannel_completeaborts on it inpsbt_txid.addpsbtoutputandaddpsbtinputnow refuse a PSBT that does not allow the addition, rather than override the flags, since a signer clears them once adding would invalidate its signature.psbt_from_b64refuses a PSBT with no valid locktime, which covers every RPC parameter and plugin reply.