Skip to content

Letting OpenSSL handle automatic ECDH negotiation keys gives us a memory leak #134

@TechnikEmpire

Description

@TechnikEmpire

#131 may not be accurate in describing what the problem is. I believe this is actually the problem, but a solution as described in 131 might allow us to keep both systems and fix this issue.

It appears that when auto generating keys, one copy doesn't get freed. There's some arguing about this being proper behavior in some openSSL dev threads. We used to create a single EC key for client and server contexts. We could revert back to this, but I'm concerned about security doing that.

If we implement the fix in 131 then we can potentially leave auto tmp key negotiation on per-context. However, that's only IF one of the openSSL dev's is accurate about there in fact being no true "leak" and that the full memory is deallocated in SSL_free. Assuming that SSL_free ends up dereferencing the per-host contexts to the point of triggering SSL_ctx_free, and assuming that SSL_ctx_free will trigger full key de-allocation, then this should be OK.

If the dev is wrong, then we may be forced to go straight back to our single, one time tmp key per global context system.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions