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

Problem: Assertion failed: rc == 0 (src/curve_client.cpp:273) #1831

Closed
hintjens opened this issue Mar 1, 2016 · 1 comment
Closed

Problem: Assertion failed: rc == 0 (src/curve_client.cpp:273) #1831

hintjens opened this issue Mar 1, 2016 · 1 comment

Comments

@hintjens
Copy link
Member

hintjens commented Mar 1, 2016

This happens in the client stack if you specify a null (all zeros) server key, and if you are using libsodium stable. Using older versions of libsodium or tweetnacl, this assert does not happen.

The cause is a change in the API where crypto_box () returns -1 on a null server key, whereas it used to ignore this error (as it ignores other invalid server keys).

Solution: do not assert on this error, handle it gracefully.

@hintjens
Copy link
Member Author

hintjens commented Mar 1, 2016

Note that the same logic exists in the server and is probably a DoS vulnerability. I've not tested that but will remove the assert in the corresponding place.

hintjens added a commit to hintjens/libzmq that referenced this issue Mar 1, 2016
Libsodium has started returning -1 in some cases.

Solution: allow and handle error returns from these calls.

Fixes zeromq#1831
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