go: internal/syscall/windows/registry: TestWalkFullRegistry failing on windows-amd64-longtest

The new windows-amd64-longtest is failing in:

ok  	image/png	0.222s
ok  	index/suffixarray	61.493s
ok  	internal/cpu	0.027s
ok  	internal/fmtsort	0.049s
ok  	internal/poll	1.098s
ok  	internal/reflectlite	0.066s
ok  	internal/singleflight	0.048s
ok  	internal/syscall/windows	0.112s
--- FAIL: TestWalkFullRegistry (9.46s)
    registry_test.go:554: DWORD value is not 4 bytes long
    registry_test.go:554: QWORD value is not 8 bytes long
    registry_test.go:554: QWORD value is not 8 bytes long
    registry_test.go:554: DWORD value is not 4 bytes long
    registry_test.go:554: QWORD value is not 8 bytes long
    registry_test.go:554: QWORD value is not 8 bytes long
    registry_test.go:569: value type 2097152 of DevLoader of LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\Configuration\Reset\Driver failed: <nil>
FAIL
FAIL	internal/syscall/windows/registry	9.500s
ok  	internal/trace	1.580s
FAIL
2019/10/22 18:59:59 Failed: exit status 1

/cc @alexbrainman @zx2c4

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 24 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for pointing this out; I can report these internally. But I think you’ll have to keep your ignore list around, since it seems unlikely that we would backport fixes for these bugs.

@bradfitz You wanted more detail over on the CL. Here’s the root cause for the integer size bug:

image

They’re writing an integer of size 8 as type REG_DWORD, which REG_DWORD requires an integer of size 4. The key is called “lParam”, which means I bet this was originally of type LPARAM which is of type LONG_PTR which is the size of a pointer. So probably the original C code was something like:

RegSetValueExW(hKey, L"lParam", 0, REG_DWORD, (const BYTE *)&whatever->lParam, sizeof(whatever->lParam));

This worked fine in the 32-bit Windows days, and then broke when they recompiled that binary for 64-bit.

I only know how to report security bugs to MSRC, but not other bugs to whatever channels Microsoft has for those. If somebody wants to direct a Microsoft person toward this thread, maybe this can get fixed.