Skip to content
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

os.networkInterfaces uses uninitialized memory #23043

Closed
tniessen opened this issue Sep 23, 2018 · 1 comment
Closed

os.networkInterfaces uses uninitialized memory #23043

tniessen opened this issue Sep 23, 2018 · 1 comment
Labels
libuv Issues and PRs related to the libuv dependency or the uv binding. os Issues and PRs related to the os subsystem.

Comments

@tniessen
Copy link
Member

  • Version: master
  • Platform: Linux 4.4.0-042stab133.2 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: libuv / os

Virtual network interfaces do not always get a hardware address assigned on Unix:

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: ::2/128 Scope:Compat
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

uv_interface_addresses does not initialize the phys_addr member in those cases. os.networkInterfaces still returns a mac property for those interfaces which relies on uninitialized memory and can thus contain any value. I guess this will need to be fixed in libuv first, or is there a way to detect whether the phys_addr field was initialized by libuv?

cc @nodejs/libuv

@addaleax addaleax added os Issues and PRs related to the os subsystem. libuv Issues and PRs related to the libuv dependency or the uv binding. labels Sep 23, 2018
@cjihrig
Copy link
Contributor

cjihrig commented Sep 25, 2018

Reopening until the next libuv update.

@cjihrig cjihrig reopened this Sep 25, 2018
cjihrig added a commit to cjihrig/node that referenced this issue Oct 8, 2018
@Trott Trott closed this as completed in c65a523 Oct 9, 2018
targos pushed a commit that referenced this issue Oct 10, 2018
PR-URL: #23336
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Fixes: #23043
Fixes: #21773
Fixes: #16601
Fixes: #22999
Fixes: #23219
Fixes: #23066
Fixes: #23067
Fixes: #23089
jasnell pushed a commit that referenced this issue Oct 17, 2018
PR-URL: #23336
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Fixes: #23043
Fixes: #21773
Fixes: #16601
Fixes: #22999
Fixes: #23219
Fixes: #23066
Fixes: #23067
Fixes: #23089
MylesBorins pushed a commit to MylesBorins/node that referenced this issue Nov 5, 2018
PR-URL: nodejs#23336
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Fixes: nodejs#23043
Fixes: nodejs#21773
Fixes: nodejs#16601
Fixes: nodejs#22999
Fixes: nodejs#23219
Fixes: nodejs#23066
Fixes: nodejs#23067
Fixes: nodejs#23089
MylesBorins pushed a commit that referenced this issue Nov 11, 2018
Backport-PR-URL: #24103
PR-URL: #23336
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Fixes: #23043
Fixes: #21773
Fixes: #16601
Fixes: #22999
Fixes: #23219
Fixes: #23066
Fixes: #23067
Fixes: #23089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libuv Issues and PRs related to the libuv dependency or the uv binding. os Issues and PRs related to the os subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants