[Bug 60232] New: GetCurrentHwProfileA crashes on a NULL argument, and the profile guid is hardcoded
http://bugs.winehq.org/show_bug.cgi?id=60232 Bug ID: 60232 Summary: GetCurrentHwProfileA crashes on a NULL argument, and the profile guid is hardcoded Product: Wine Version: 11.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: advapi32 Assignee: wine-bugs@list.winehq.org Reporter: nayuta65535@gmail.com Target Milestone: --- Distribution: --- GetCurrentHwProfile is still the semi-stub added in 2002. Four separate problems, all reproduced on an unmodified wine-11.16 build (../configure --enable-archs=i386,x86_64, fresh prefix, no DLL overrides), compared against Windows 11 on the same machine using the same binary. 1. GetCurrentHwProfileA(NULL) crashes. wine: Unhandled page fault on write access to 0000000000000000 at address 00006FFFFF1E3F38 There is no NULL check, so the first write to pInfo->dwDockInfo faults. Windows returns FALSE and sets ERROR_INVALID_PARAMETER (0x57). 2. The profile guid is a constant compiled into Wine, so every installation reports the same machine identity: Wine: {12340001-1234-1234-1234-123456789012} Windows: {7572da61-84c6-11f0-a00e-806e6f6e6963} Applications use this value to identify the machine they are running on. 3. GetCurrentHwProfileW always returns FALSE. On Windows it succeeds and returns values matching the A version. 4. dwDockInfo is DOCKINFO_DOCKED (0x2). On the Windows machine it is DOCKINFO_UNDOCKED (0x1). On Windows the profile lives at HKLM\System\CurrentControlSet\Control\IDConfigDB\Hardware Profiles\0001 HwProfileGuid = "{7572da61-84c6-11f0-a00e-806e6f6e6963}" FriendlyName = "Undocked Profile" with CurrentConfig, CurrentDockInfo\DockingState, AcpiAlias\0001 and a Hardware Profiles\0000 template alongside it. The guid there is a version 1 UUID whose timestamp is 2025-08-29, matching when Windows was installed on this machine, which supports MSDN's statement that the system generates it at install time. Its node field is the fixed value 806e6f6e6963 rather than a MAC address. Bug 4468 covers the same stub but was closed as FIXED once Full Tilt Poker started working again; the commit recorded there (eb48a472) only corrects a typo in the hardcoded guid string, which had one hex digit too many for five years. The function itself was never implemented. Bug 4468 Comment #12 on that bug already describes the NULL crash and outlines what a real implementation would need to do. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60232 nayuta65535@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|GetCurrentHwProfileA |crypt32: |crashes on a NULL argument, |GetCurrentHwProfileA |and the profile guid is |crashes on a NULL argument, |hardcoded |and the profile guid is | |hardcoded Component|advapi32 |crypt32 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60232 nayuta65535@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|crypt32: |advapi32: |GetCurrentHwProfileA |GetCurrentHwProfileA |crashes on a NULL argument, |crashes on a NULL argument, |and the profile guid is |and the profile guid is |hardcoded |hardcoded -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60232 nayuta65535@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|crypt32 |advapi32 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla