signrawtransaction: validate private key. #5461

pull paveljanik wants to merge 1 commits into bitcoin:master from paveljanik:signrawtransactiondos changing 1 files +2 −0
  1. paveljanik commented at 3:09 PM on December 11, 2014: contributor

    Fix issue #5454. Validate private key is inside allowed range.

  2. signrawtransaction: validate private key. aa768f1848
  3. laanwj added the label Bug on Dec 11, 2014
  4. laanwj added the label RPC on Dec 11, 2014
  5. sipa commented at 3:17 PM on December 11, 2014: member

    utACK for 0.10 and master.

  6. laanwj commented at 4:03 PM on December 11, 2014: member

    Can you give a reproducible example of the crash?

    I just tried the following on testnet based on the command line of issue #5454, without this patch

        X=$(src/bitcoin-cli -testnet createrawtransaction  "[{\"txid\":\"00000000faeea6702a677fdc53f80fa15c017a159674dcff285ada3017844327\",\"vout\":0}]" "{\"muwmUMjAuMQYNZtr4kLKcUjXUe1rrGgne7\":0.01}")
        src/bitcoin-cli -testnet signrawtransaction $X '[]' '["5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU"]'
    

    This gives the output:

    error: {"code":-5,"message":"Invalid private key"}
    

    Edit: doh, managed to reproduce it, privkeys have a different marker byte on testnet and mainnet, if you use 91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwi1C2GD it reproduces

  7. laanwj commented at 4:19 PM on December 11, 2014: member

    Tested ACK commithash aa768f1848b00e0fd615016598d3fb1f1da240ed (signature)

  8. gmaxwell commented at 10:15 AM on December 12, 2014: contributor

    ACK

  9. jtimon commented at 10:28 AM on December 12, 2014: contributor

    utACK

  10. laanwj merged this on Dec 12, 2014
  11. laanwj closed this on Dec 12, 2014

  12. laanwj referenced this in commit 5f7279ac70 on Dec 12, 2014
  13. laanwj referenced this in commit 44b4c0d8a9 on Dec 12, 2014
  14. paveljanik deleted the branch on Dec 13, 2014
  15. reddink referenced this in commit 4a5511c7ad on May 27, 2020
  16. fanquake deleted a comment on Nov 29, 2020
  17. fanquake locked this on Nov 29, 2020

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: 2026-04-13 15:15 UTC

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