-
Notifications
You must be signed in to change notification settings - Fork 18k
internal/syscall/windows/registry: TestWalkFullRegistry failing on windows-amd64-longtest #35084
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
Comments
That's pretty weird.
-->
-->
I don't see anything in docs about |
Looks like that's coming from
That looks in theory fine, but I wonder if the INF loader isn't used to pulling integer flags out of the [Strings] section like that. Either way, looks like a Windows bug. Onto the remaining integer size mysteries. |
@bradfitz What's the deal with the long tests? Are they something that nobody ever runs, hence you discovering this only now? |
@zx2c4, yup... https://golang.org/cl/202479 "dashboard: add windows and 32-bit longtest builders" for #26529 |
Change https://golang.org/cl/202678 mentions this issue: |
@bradfitz You wanted more detail over on the CL. Here's the root cause for the integer size bug: 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 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. |
@zx2c4, nice, thanks. Maybe we can get away with a whitelist of known registry entries to skip, then? I suspect the point of that test was just to exercise all the code paths by throwing a lot of mixed data at it. |
@bradfitz Done. Not pretty, but it seems to be working, at least on my machine. |
Change https://golang.org/cl/202897 mentions this issue: |
… TestWalkFullRegistry It turns out that Windows has "legitimate" keys that have bogus type values or bogus lengths that don't correspond with their type. On up to date Windows 10 systems, this test always fails for this reason. These keys exist because of bugs in Microsoft's code. This commit works around the problem by simply blacklisting known instances. It also expands the error message a bit so that we can make adjustments should the problem ever happen again, and reformats the messages so that it makes copy and pasting into the blacklist easier. Updates #35084 Change-Id: I50322828c0eb0ccecbb62d6bf4f9c726fa0b3c27 Reviewed-on: https://go-review.googlesource.com/c/go/+/202897 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@jstarks maybe you could report this bug at the right channel? Thank you. Alex |
Also the INF one too, above. |
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. |
I'm not quite sure what backport means at contemporary Microsoft. What constitutes a new version? Anniversary->Creators (the new "service pack")? Or 10->11? |
@zx2c4 These registry types under Class*\Configuration are correct and by design. INF files get compiled into registry state when they're added to the system. The INF is only ever read by the system one time if they're universal, as this one is - from then on, we only reference the registry state. This registry type indicates that it's actually a delete. |
@zlockard Indeed I saw it was Do you have an REG_* constant name you'd prefer for the 0x200000 type? |
These keys get processed every time a media device gets installed (they're part of the device installation state), so we can't just delete them when we read the INF - we have to cache the intent. This logic is internal and there are more types than just this one, so don't fish this type out. For any non-standard types, you should interpret it as REG_BINARY. |
Still failing on the
|
Change https://golang.org/cl/203604 mentions this issue: |
Change https://golang.org/cl/203605 mentions this issue: |
This test's existence was predicated upon assumptions about the full range of known data types and known data into those types. However, we've learned from Microsoft that there are several undocumented secret registry types that are in use by various parts of Windows, and we've learned from inspection that many Microsoft uses of registry types don't strictly adhere to the recommended value size. It's therefore foolhardy to make any assumptions about what goes in and out of the registry, and so this test is meaningless and error-prone. Updates golang/go#35084 Change-Id: Ie545229afd8dc5bde90fffa0f735f7102cd4a6eb Reviewed-on: https://go-review.googlesource.com/c/sys/+/203605 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot, please backport to Go 1.13. This is a test fix. It is needed to resolve a failure on windows-amd64-longtest builder, which could be masking other problems and making releasing Go 1.13.x more difficult. |
Backport issue(s) opened: #37826 (for 1.13). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/223237 mentions this issue: |
…tWalkFullRegistry due to false assumptions This test's existence was predicated upon assumptions about the full range of known data types and known data into those types. However, we've learned from Microsoft that there are several undocumented secret registry types that are in use by various parts of Windows, and we've learned from inspection that many Microsoft uses of registry types don't strictly adhere to the recommended value size. It's therefore foolhardy to make any assumptions about what goes in and out of the registry, and so this test, as well as its "blacklist", are meaningless. For #35084. Fixes #37826. Change-Id: I6c3fe5fb0e740e88858321b3b042c0ff1a23284e Reviewed-on: https://go-review.googlesource.com/c/go/+/203604 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> (cherry picked from commit 0d3092f) Reviewed-on: https://go-review.googlesource.com/c/go/+/223237 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
The new windows-amd64-longtest is failing in:
/cc @alexbrainman @zx2c4
The text was updated successfully, but these errors were encountered: