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

Test BoringSSL refcounting #14

Open
joshlf opened this Issue Jan 7, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@joshlf
Copy link
Member

joshlf commented Jan 7, 2019

Currently, we have a few small smoke tests to make sure that we don't decrement BoringSSL refcounts too far. However, we have no tests to ensure that we decrement refcounts far enough (in other words, that we don't leak resources by leaving unused objects allocated and constructed).

We should also test the latter. The way to do this is probably to figure out how to inspect the refcount on a BoringSSL object and use that mechanism to ensure that the refcount on these objects is 1 when we only hold a single reference. That said, perhaps there's a better way to do this.

EDIT: Let's first try to see if we can enable ASan (#15), which should address this.

@davidben

This comment has been minimized.

Copy link

davidben commented Jan 8, 2019

ASan should be able to check both of these without reaching into BoringSSL's private structures (unsupported). If you over-decrement, ASan will report a UAF. If you under-decrement, ASan will report a leak.

@joshlf

This comment has been minimized.

Copy link
Member

joshlf commented Jan 8, 2019

OK, I've opened #15 and I'll update the first comment to reference it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment