-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
process.setuid results in an abort #32750
Comments
I can recreate this on master, |
definition of node/lib/internal/validators.js Line 101 in 203776f
Line 247 in 203776f
|
failed later -> failed * in * later |
node --expose-internals -e 'require("internal/validators").validateInt32(-0)' does not throw, implies this method ( |
node/lib/internal/validators.js Line 83 in b023d61
does this imply |
My team is trying to find bugs and vulnerabilities at the interface between js and c++, and we think this problem of inconsistency is an interesting study case for us. Can you give us a confirmation for this bug? As proof for us to make a discussion in our work. |
@zyscoder - that is an interesting area to research, good luck! I tagged it as /cc @nodejs/v8 in case if there is an obvious explanation. |
This comment has been minimized.
This comment has been minimized.
bisecting now. |
Interesting! That problem is not only present in
V8 always returns I see two things that we can do:
Thoughts? |
technically |
The counterargument is that |
Fixes: nodejs#32750 Signed-off-by: James M Snell <jasnell@gmail.com>
What steps will reproduce the bug?
Directly run the following code snippet using node:
How often does it reproduce? Is there a required condition?
No. This potential bug can always be reproduced.
What is the expected behavior?
The argument to 'process.setuid' should be a Uint32 or string value, but we passed a -0 into it. The function should throw an exception or other similar error-reporting stuff rather than crash the whole nodejs process.
What do you see instead?
This is the stack dump produced during abort:
Additional information
The text was updated successfully, but these errors were encountered: