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

ALL: Finalize edge case memory leak potential in memory allocation #34

Open
jpaskhay opened this issue Jul 8, 2019 · 0 comments
Open

Comments

@jpaskhay
Copy link
Contributor

jpaskhay commented Jul 8, 2019

The C# ProtectedMemorySecret initialization has try/catch logic around the initial copying of the source data to handle edge case failures that could lead to memory leaks (not dealloc'ing). This seems like something that should be in the Java implementation as well. Additionally, there is an inconsistency in the aforementioned C# cleanup handling that is different than the regular cleanup/close path (not doing the pointer exchange).

We had untested changes around this that didn't make it into this public repo. We should normalize the approaches between the languages and update the Secure Memory documentation to reflect it accordingly. May be good opportunity to also verify whether the pointer exchanges are needed (if we're clearing/deallocating anyway).

jpaskhay added a commit that referenced this issue Jul 8, 2019
- added #34 to address the issue in code and documentation
sushantmimani pushed a commit that referenced this issue Jul 8, 2019
* initial secure memory documentation

* Update Internals.md

* minor cleanup and use syntax highlighting to make it a little easier on the eyes

* removing TODO from secure memory documentation

* added #34 to address the issue in code and documentation
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