Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

dhparam_cb not unset on destruction #52

Open
daurnimator opened this issue Aug 8, 2015 · 0 comments
Open

dhparam_cb not unset on destruction #52

daurnimator opened this issue Aug 8, 2015 · 0 comments

Comments

@daurnimator
Copy link
Contributor

I was reading through the code, and saw that the callback dhparam_cb is setup via SSL_CTX_set_tmp_dh_callback, but not torn down.
This means if the reference to the ssl context is collected while a DH negotiation is pending, there will be an illegal de-reference (segfault if we're lucky) in dhparam_cb. I don't think this can currently be reached within the confines of luasec, but if a SSL_CTX* or SSL* ever escaped then there would be a problem.
For safety, meth_destroy should unset the dh callback.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

1 participant