This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ObjectWrap/NODE_SET_PROTOTYPE_METHOD/node::SetPrototypeMethod is unsafe #6690
Comments
@cscott do you think you could provide a basic pull-request for this just to demonstrate what you're suggesting? I think you're going to have to communicate this better to get any action here. |
cscott
added a commit
to cscott/node
that referenced
this issue
Mar 6, 2014
This prevents segfaults when a native method is reassigned to a different object to corrupt `args.This()`. Closes nodejs#6690.
cool, thanks @cscott, I think the core guys are super busy at the moment so probably don't have a whole lot of bandwidth to absorb this and it's not exactly a straightforward thing to absorb! |
cscott
added a commit
to cscott/node
that referenced
this issue
Mar 7, 2014
This prevents segfaults when a native method is reassigned to a different object (which corrupts `args.This()`). When unwrapping, clients should use `args.Holder()` instead of `args.This()`. Closes nodejs#6690.
Fixed the issues above in the latest patch at PR #7261 although there are more test cases that could be written. |
cscott
added a commit
to cscott/node
that referenced
this issue
Mar 14, 2014
This prevents segfaults when a native method is reassigned to a different object (which corrupts `args.This()`). When unwrapping, clients should use `args.Holder()` instead of `args.This()`. Closes nodejs#6690.
cscott
added a commit
to cscott/node
that referenced
this issue
Mar 14, 2014
This prevents segfaults when a native method is reassigned to a different object (which corrupts `args.This()`). When unwrapping, clients should use `args.Holder()` instead of `args.This()`. Closes nodejs#6690.
cscott
added a commit
to cscott/node
that referenced
this issue
Mar 17, 2014
This prevents segfaults when a native method is reassigned to a different object (which corrupts `args.This()`). When unwrapping, clients should use `args.Holder()` instead of `args.This()`. Closes nodejs#6690.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
SetPrototypeMethod should set a
Signature
on theFunctionTemplate
, to prevent issues like TryGhost/node-sqlite3#236When used in conjunction with ObjectWrap, w/o a signature it is possible to pass bogus things as
this
, which could become a security hole.The text was updated successfully, but these errors were encountered: