-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
dns.setServers is memory unsafe and can be used to dump core #8538
Comments
This was referenced Sep 14, 2016
deian
changed the title
dns.setServers is memory unsafe and can be used to dump core
Sep 14, 2016
dns.setServers
is memory unsafe and can be used to dump core
3 tasks
This is a known issue and affects most C++ API functions accepting non-primitive values. For more information: |
imyller
added
the
c++
Issues and PRs that require attention from people who are familiar with C++.
label
Sep 15, 2016
3 tasks
Like #8537, I also don' think this will be resolved by using the Maybe API. This is deliberately abusing the |
See #8567 for a fix for this one. |
cjihrig
added a commit
to cjihrig/node
that referenced
this issue
Sep 20, 2016
This commit adds better handling of exceptional array formats passed to dns.setServers(). Prior to this commit, the input array was validated using map(), which preserves holes, allowing them to be passed to c-ares, crashing Node. This commit replaces map() with forEach(), which skips holes. Fixes: nodejs#8538 PR-URL: nodejs#8567 Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fishrock123
pushed a commit
that referenced
this issue
Oct 11, 2016
This commit adds better handling of exceptional array formats passed to dns.setServers(). Prior to this commit, the input array was validated using map(), which preserves holes, allowing them to be passed to c-ares, crashing Node. This commit replaces map() with forEach(), which skips holes. Fixes: #8538 PR-URL: #8567 Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dns.setServers
is memory unsafe and can be used to dump core.This doesn't seem like a serious security vulnerability (hence my reporting here), but can certainly be used to cause DOS and it might be nice to have a stdlib that is memory safe.
another variant:
Related to: #8539, #8537, #7902
The text was updated successfully, but these errors were encountered: