Skip to content

os.networkInterfaces uses uninitialized memory #23043

Description

@tniessen
  • 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

Activity

  1. added
    osIssues and PRs related to the os subsystem.
    libuvIssues and PRs related to the libuv dependency or the uv binding.
    on Sep 23, 2018
  2. cjihrig commented on Sep 25, 2018

    @cjihrig
    Contributor

    Reopening until the next libuv update.

  3. added a commit that references this issue on Oct 8, 2018
  4. added a commit that references this issue on Oct 10, 2018
  5. added a commit that references this issue on Oct 17, 2018
  6. added a commit that references this issue on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    libuvIssues and PRs related to the libuv dependency or the uv binding.osIssues and PRs related to the os subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions