-
Notifications
You must be signed in to change notification settings - Fork 38.7k
psbt: Avoid unsigned int overflow in PSBT_IN_TAP_BIP32_DERIVATION #25812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
darosior
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK befa2a76da4adb5140b4870cd241c38e8ae2e0d0
|
can we catch this in test? |
|
Added a test case. |
befa2a7 to
70a55c0
Compare
|
ACK 70a55c0 |
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review ACK 70a55c0, this should avoid the issue reported in #25749
Error message with the new test, without the code change in psbt.h:
TX decode failed Fee exceeds maximum configured by user (e.g. -maxtxfee, maxfeerate)
Error message with the new test and the code change in psbt.h:
TX decode failed Input Taproot BIP32 keypath has an invalid length
Unrelated: it may be good as a follow-up to add a colon at the end of "TX decode failed" before appending the specific error message.
| for invalid in invalids: | ||
| assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decodepsbt, invalid) | ||
| for invalid in invalid_with_msgs: | ||
| psbt, msg = invalid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you retouch
- for invalid in invalid_with_msgs:
- psbt, msg = invalid
+ for psbt, msg in invalid_with_msgs:|
re-utACK 70a55c0 |
…_BIP32_DERIVATION 70a55c0 psbt: Avoid unsigned int overflow in PSBT_IN_TAP_BIP32_DERIVATION (Andrew Chow) Pull request description: Fixes bitcoin#25749 ACKs for top commit: instagibbs: ACK 70a55c0 darosior: re-utACK 70a55c0 jonatack: Review ACK 70a55c0, this should avoid the issue reported in bitcoin#25749 Tree-SHA512: 6bb58e1cda9a5baa50fcd24f818b5b27ed94f0d33da3f71f6e457618176611bf2a84e1864e9a48d9303c301252bc4c1dee8b19a67dd713e849fb9442851ca341
Fixes #25749