Skip to content
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

fix: Avoid tsh panic on Windows Server 2019 #38444

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

codingllama
Copy link
Contributor

@codingllama codingllama commented Feb 20, 2024

Some Windows installs appear to contain a WebAuthn.dll without WebAuthNGetApiVersionNumber, which leads to a panic. This PR aims to fix that.

Error on Windows Server 2019
panic: Failed to find WebAuthNGetApiVersionNumber procedure in WebAuthn.dll: The specified procedure could not be found.

goroutine 1 [running]:
golang.org/x/sys/windows.(*LazyProc).mustFind(...)
	C:/Users/runneradmin/go/pkg/mod/golang.org/x/[email protected]/windows/dll_windows.go:325
golang.org/x/sys/windows.(*LazyProc).Addr(...)
	C:/Users/runneradmin/go/pkg/mod/golang.org/x/[email protected]/windows/dll_windows.go:333
github.com/gravitational/teleport/lib/auth/webauthnwin.webAuthNGetApiVersionNumber()
	C:/a/teleport.e/teleport.e/lib/auth/webauthnwin/zsyscall_windows.go:83 +0xb4
github.com/gravitational/teleport/lib/auth/webauthnwin.newNativeImpl()
	C:/a/teleport.e/teleport.e/lib/auth/webauthnwin/webauthn_windows.go:65 +0xad
github.com/gravitational/teleport/lib/auth/webauthnwin.init()
	C:/a/teleport.e/teleport.e/lib/auth/webauthnwin/webauthn_windows.go:36 +0x169

WebAuthNGetApiVersionNumber is a v1 procedure on WebAuthn.dll, so in its absence we disable WebAuthn support as well (as all bets are off in which other functions may or may not exist).

Changelog: Avoid tsh/WebAuthn.dll panic on Windows Server 2019

@codingllama
Copy link
Contributor Author

FYI @stevenGravy.

@stevenGravy
Copy link
Contributor

FYI @stevenGravy.

thanks! @tenaciousdlg

@codingllama
Copy link
Contributor Author

Steven kindly tried out a test build, seems to be working fine.

@codingllama codingllama added this pull request to the merge queue Feb 21, 2024
Merged via the queue into master with commit ac48c48 Feb 21, 2024
37 of 38 checks passed
@codingllama codingllama deleted the codingllama/webauthn-dll-zero branch February 21, 2024 13:34
@public-teleport-github-review-bot

@codingllama See the table below for backport results.

Branch Result
branch/v13 Create PR
branch/v14 Create PR
branch/v15 Create PR

@sergefedorow
Copy link

I have the same issue with tsh v.14.3.3 and 15.0.2.
Client is Windows 10 Enterprise Evaluation, version 1809
Installation did from zip file.

C:\Users\IEUser>tsh version
panic: Failed to find WebAuthNGetApiVersionNumber procedure in WebAuthn.dll: The specified procedure could not be found.

goroutine 1 [running]:
golang.org/x/sys/windows.(*LazyProc).mustFind(...)
        C:/Users/runneradmin/go/pkg/mod/golang.org/x/[email protected]/windows/dll_windows.go:325
golang.org/x/sys/windows.(*LazyProc).Addr(...)
        C:/Users/runneradmin/go/pkg/mod/golang.org/x/[email protected]/windows/dll_windows.go:333
github.com/gravitational/teleport/lib/auth/webauthnwin.webAuthNGetApiVersionNumber()
        C:/a/teleport.e/teleport.e/lib/auth/webauthnwin/zsyscall_windows.go:83 +0xb4
github.com/gravitational/teleport/lib/auth/webauthnwin.newNativeImpl()
        C:/a/teleport.e/teleport.e/lib/auth/webauthnwin/webauthn_windows.go:65 +0xad
github.com/gravitational/teleport/lib/auth/webauthnwin.init()
        C:/a/teleport.e/teleport.e/lib/auth/webauthnwin/webauthn_windows.go:36 +0x169

@ravicious
Copy link
Member

@sergefedorow Could you try tsh v14.3.4 which shipped with this fixed? 15.0.3 is not out yet but it'll include the fix as well.

@sergefedorow
Copy link

sergefedorow commented Feb 28, 2024

@ravicious Unfortunately 14.3.4 does not work for me either.

2024-02-28_14-40

@ravicious
Copy link
Member

ravicious commented Feb 28, 2024

Sorry, my bad, I looked at the release notes for 14.3.4 and I saw #36868 which was a fix for a similar problem.

14.3.7+ is going to include the fix, I imagine it'll be released later this or next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants