psbt: Avoid unsigned int overflow in PSBT_IN_TAP_BIP32_DERIVATION #25812

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:psbt-hd-path-int-overflow changing 3 files +13 −0
  1. achow101 commented at 9:22 pm on August 9, 2022: member
    Fixes #25749
  2. fanquake requested review from darosior on Aug 9, 2022
  3. fanquake added the label PSBT on Aug 9, 2022
  4. MarcoFalke added this to the milestone 24.0 on Aug 10, 2022
  5. darosior approved
  6. darosior commented at 2:39 pm on August 10, 2022: member
    utACK befa2a76da4adb5140b4870cd241c38e8ae2e0d0
  7. fanquake requested review from instagibbs on Aug 10, 2022
  8. instagibbs commented at 2:48 pm on August 10, 2022: member
    can we catch this in test?
  9. psbt: Avoid unsigned int overflow in PSBT_IN_TAP_BIP32_DERIVATION 70a55c059b
  10. achow101 commented at 3:58 pm on August 10, 2022: member
    Added a test case.
  11. achow101 force-pushed on Aug 10, 2022
  12. instagibbs commented at 4:02 pm on August 10, 2022: member
    ACK 70a55c059b014c7a687de7a4813a90c65148aed4
  13. in test/functional/rpc_psbt.py:465 in 70a55c059b
    460@@ -460,6 +461,9 @@ def run_test(self):
    461         # Invalid PSBTs
    462         for invalid in invalids:
    463             assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decodepsbt, invalid)
    464+        for invalid in invalid_with_msgs:
    465+            psbt, msg = invalid
    


    jonatack commented at 4:37 pm on August 10, 2022:

    if you retouch

    0-        for invalid in invalid_with_msgs:
    1-            psbt, msg = invalid
    2+        for psbt, msg in invalid_with_msgs:
    
  14. jonatack commented at 4:51 pm on August 10, 2022: contributor

    Review ACK 70a55c059b014c7a687de7a4813a90c65148aed4, 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.

  15. darosior commented at 7:47 am on August 11, 2022: member
    re-utACK 70a55c059b014c7a687de7a4813a90c65148aed4
  16. fanquake merged this on Aug 11, 2022
  17. fanquake closed this on Aug 11, 2022

  18. sidhujag referenced this in commit 47449b0492 on Aug 11, 2022
  19. bitcoin locked this on Aug 11, 2023


achow101 darosior instagibbs jonatack


instagibbs

Labels
PSBT

Milestone
24.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me