Fix crash in validateaddress with -disablewallet #6970

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2015_11_rpc_validateaddress_crash changing 3 files +35 −2
  1. laanwj commented at 7:45 AM on November 9, 2015: member

    Fix a null pointer dereference in validateaddress with -disablewallet. Also add a regression testcase.

    Problem reported here: #6963 (comment)

    I think this needs to be backported to 0.11 as well.

  2. Fix crash in validateaddress with -disablewallet
    Fix a null pointer dereference in validateaddress with -disablewallet. Also add a regression testcase.
    2980a18572
  3. laanwj added the label Bug on Nov 9, 2015
  4. laanwj added the label Priority High on Nov 9, 2015
  5. laanwj added the label RPC on Nov 9, 2015
  6. jonasschnelli commented at 7:58 AM on November 9, 2015: contributor

    Nice catch! I was also looking for the NULL pointer access... we need to be careful by always keeping in mind: #ifdef ENABLE_WALLET != pwalletMain available.

  7. jonasschnelli commented at 7:58 AM on November 9, 2015: contributor

    utACK

  8. paveljanik commented at 8:44 AM on November 9, 2015: contributor

    ACK Checked other instances, OK.

  9. dcousens commented at 9:48 AM on November 9, 2015: contributor

    utACK

  10. fanquake commented at 10:42 AM on November 9, 2015: member

    utACK

    On Monday, November 9, 2015, Daniel Cousens notifications@github.com wrote:

    utACK

    — Reply to this email directly or view it on GitHub #6970 (comment).

  11. MarcoFalke commented at 10:53 AM on November 9, 2015: member

    backported to 0.11

    yes and utACK.

  12. laanwj merged this on Nov 9, 2015
  13. laanwj closed this on Nov 9, 2015

  14. laanwj referenced this in commit 92701b3b89 on Nov 9, 2015
  15. laanwj commented at 11:17 AM on November 9, 2015: member

    Good news: the issue doesn't exist in 0.11 (and hence not in any released version)

    This problem was introduced in 506bae3ac94ae9d5edfa794d9b80a7c9921ace17 (#6262) by @dexX7 . The code used to check for ISMINE_*, which can only be ISMINE_NO if there is no wallet, but that check was removed there.

  16. jgarzik commented at 1:12 PM on November 9, 2015: contributor

    ut ACK

  17. jlopp commented at 2:02 PM on November 9, 2015: contributor

    Thanks for the quick fix!

  18. laanwj commented at 2:20 PM on November 9, 2015: member

    @jlopp Did it fix your issue? (I still don't see how this can cause a SIGILL in OpenSSL)

  19. jlopp commented at 11:20 PM on November 9, 2015: contributor

    @laanwj Yes, I confirmed that my node no longer crashes after issuing the validateaddress command. As for the other errors I had posted in my comments, those were errors that the debugger was throwing immediately upon trying to run bitcoind, not upon calling validateaddress.

  20. luke-jr referenced this in commit 1b0fde1299 on Nov 18, 2015
  21. luke-jr referenced this in commit 312cf155cf on Dec 8, 2015
  22. zkbot referenced this in commit a7cf698873 on Mar 4, 2017
  23. MarcoFalke locked this on Sep 8, 2021

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