-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
src,lib: handle invalid stdio configuration gracefully #55942
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #55942 +/- ##
==========================================
- Coverage 88.01% 88.00% -0.01%
==========================================
Files 656 656
Lines 189136 189151 +15
Branches 36004 36012 +8
==========================================
+ Hits 166461 166470 +9
- Misses 15842 15853 +11
+ Partials 6833 6828 -5
|
return; | ||
} | ||
|
||
// Refs: https://github.com/nodejs/node/issues/55932 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the link, a short description of the issue being tested would be helpful so folks don't have to actually follow the link to see what this is about.
I'm fine with improving robustness wrt userland prototype changes, but I don't think we should add tests for that. |
e079e6e
to
7e19657
Compare
Fixes an issue where malformed or unexpected stdio configurations could cause crashes or undefined behavior during child process spawning. This patch ensures robust validation of stdio entries: Fixes: nodejs#55932 Signed-off-by: Juan José Arboleda <[email protected]>
7e19657
to
67467c6
Compare
stdio->Set(context, env->type_string(), env->ignore_string()) | ||
.FromJust(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This opens the door for another crash if the prototype has a throwing setter for the type
property.
If you keep this approach, you should at least handle the error instead of calling FromJust
.
Fixes an issue where malformed or unexpected stdio configurations could cause crashes or undefined behavior during child process spawning. This patch ensures robust validation of stdio entries:
Fixes: #55932
I don't think we should patch user-space misconfiguration. This is a rare case and, could be extrapolated to different issues. I never faced an issue due to proto mutation. But I personally don't think we should patch that (except for the native layer.)