-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
Assertion failure (possible security hole?) #236
Comments
FWIW, the assertion checks the case where you assign the method to an object with no internal fields. The security issue is if you manage to pass an object which does have an internal field (like from another wrapper object) but for a different type of object. Then you're going to go ahead and scribble on that other object and who knows what happens after that. |
Thank you very much for this report @cscott. Would it be possible to provide a patch? If not I'll take a look at this when I find some time to study the issue more. |
started work on this. I can confirm both the crash and the method of fixing it (turning it into an @cscott - any sense if nodejs/node-v0.x-archive#6690 is actionable or not? I'd much prefer to have this blessed by node core or NAN before changing node-sqlite3 to not use node core macros. |
Upstream merged nodejs/node-v0.x-archive#6690 (in nodejs/node-v0.x-archive#7261). So on the |
Thanks @cscott - I had previously done master...fix-unsafe-access. Does that look right? |
AFAICT this is now an |
You should use the
Signature
parameter to v8FunctionTemplate
to prevent calling methods with the improper receiver type. (And then you should also useaccessor.Holder()
instead ofaccessor.This()
when you unwrap.)The text was updated successfully, but these errors were encountered: