-
Notifications
You must be signed in to change notification settings - Fork 389
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
VirtIO network apdapter cause UuidCreateSequential() generate GUID without adapter's MAC Address #1017
Comments
Thank you for reporting Out of academic curiosity, what's the reason to use insecure function to begin with? Another question, what happens with e1000 adapter in QEMU? Thanks. |
Thank you for getting back to me so quickly. The reason is that I'm using a software which uses the GUID from UuidCreateSequential() to obtain mac address to bind to a specific macine. Changing to e1000 with the same mac will return the GUID with MAC address in the ending. I come across the code snippet in ParaNdis_Oid.cpp, which proves my guess.
And I looked up IEEE OUI list just now. There is no entry for RedHat or this OUI: |
Red Hat doesn't have a registered IEEE vendor ID. In any case, a system can have multiple NICs, isn't it better to use https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersinfo or device enumeration to get MAC addresses? |
@YanVugenfirer It's interesting that I asked ChatGPT, and it responded the same method. Maybe that software is just sponsored by ChatGPT lol. Closing the issue now since it's but a bug. The conversation: Me
ChatGPT
|
Describe the bug
VirtIO network apdapter cause UuidCreateSequential() generate GUID without adapter's MAC Address
To Reproduce
Download and run the attachment in the following bug report(or you can compile your own with the source)
https://bugs.launchpad.net/qemu/+bug/1119281?comments=all
Run the executable. Record the result. Whose last 48 bits is inconsistent with VirtoIO network adapter's mac.
Reboot. The GUID may change. Still not consistent with VirtoIO network adapter's mac.
Expected behavior
GUID should contain the MAC address of our network adapter.
Refer:
"For security reasons, UuidCreate was modified so that it no longer uses a machine's MAC address to generate UUIDs. UuidCreateSequential was introduced to allow creation of UUIDs using the MAC address of a machine's Ethernet card."
https://learn.microsoft.com/en-us/windows/win32/api/rpcdce/nf-rpcdce-uuidcreatesequential
Screenshots
N/A.
Host:
VM:
Additional context
Possible cause: https://bugs.launchpad.net/qemu/+bug/1119281/comments/9
The text was updated successfully, but these errors were encountered: