Skip to content
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

Security: risk of buffer overflow in submit_upstream_work #150

Open
pascal-cuoq opened this issue Feb 15, 2015 · 0 comments
Open

Security: risk of buffer overflow in submit_upstream_work #150

pascal-cuoq opened this issue Feb 15, 2015 · 0 comments

Comments

@pascal-cuoq
Copy link

In submit_upstream_work, line 452 :

        sprintf(s,
            "{\"method\": \"mining.submit\", \"params\": [\"%s\", \"%s\", \"%s\", \"%s\", \"%s\"], \"id\":4}",
            pool->user, work->job_id, xnonce2str, ntimestr, noncestr);

The variable s indicates a stack-allocated buffer of a fixed size. Also work->job_id, one of the dangerous-looking arguments, comes straight from the server and I did not see anything that would limit its size (*).

The other dangerous-looking argument is xnonce2str, which has a dynamic size in work->xnonce2_len.

This was fixed in pooler-cpuminer with the following commit. The vulnerability appears to have first been reported here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant