-
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
Fix crash in GetInterfaceAddresses #4272
Fix crash in GetInterfaceAddresses #4272
Conversation
LGTM |
LGTM |
LGTM. |
LGTM. One small nit tho: can you please update the commit log message to fit the style guidelines described here: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit |
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are uninitialised. This can cause a segmentation fault inside GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error. This issue was observed when using uCLibc-ng version 1.0.9 because uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly undefines HAVE_IFADDRS_H. Signed-off-by: Martin Bark <martin@barkynet.com>
Sorry about that, I just updated the commit message, hope that's OK now. BTW, forgot to say this issue is in all versions of node after 0.12.0 |
Any hold up here? |
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are uninitialised. This can cause a segmentation fault inside GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error. This issue was observed when using uCLibc-ng version 1.0.9 because uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly undefines HAVE_IFADDRS_H. Signed-off-by: Martin Bark <martin@barkynet.com> PR-URL: #4272 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Only CI error wasn't fatal to tests and is purely Jenkins related. Change LGTM. Landed @ 028194b. Thanks for hunting this one down and submitting a fix @martinbark. I believe this is your first commit to core, welcome on board, I hope you find other ways to contribute! |
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are uninitialised. This can cause a segmentation fault inside GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error. This issue was observed when using uCLibc-ng version 1.0.9 because uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly undefines HAVE_IFADDRS_H. Signed-off-by: Martin Bark <martin@barkynet.com> PR-URL: nodejs#4272 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are uninitialised. This can cause a segmentation fault inside GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error. This issue was observed when using uCLibc-ng version 1.0.9 because uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly undefines HAVE_IFADDRS_H. Signed-off-by: Martin Bark <martin@barkynet.com> PR-URL: #4272 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are uninitialised. This can cause a segmentation fault inside GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error. This issue was observed when using uCLibc-ng version 1.0.9 because uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly undefines HAVE_IFADDRS_H. Signed-off-by: Martin Bark <martin@barkynet.com> PR-URL: #4272 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are uninitialised. This can cause a segmentation fault inside GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error. This issue was observed when using uCLibc-ng version 1.0.9 because uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly undefines HAVE_IFADDRS_H. Signed-off-by: Martin Bark <martin@barkynet.com> PR-URL: nodejs#4272 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are
uninitialised. This can cause a segmentation fault inside
GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix
the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error.
This issue was observed when using uCLibc-ng version 1.0.9 because
uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly
undefines HAVE_IFADDRS_H.
I have submitted a pull request to libuv to fix uClibc-ng support, see libuv/libuv#653.
Also, see https://bugs.busybox.net/show_bug.cgi?id=8296 for further details on
the origins of this bug.