-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Compiled for cygwin - client_converse: receive: unexpected internal error #8
Comments
Hello, thanks for reporting. |
sure, hope the complete log helps:
|
Seems like helper is terminated without doing anything, do you have
libfido2 and libcbor installed in your cygwin environment? Winhello do not
need them but they are dependencies of ssh-sk-helper so they need to be
installed correctly.
…On Sat, Jan 23, 2021 at 7:22 PM denniskniep ***@***.***> wrote:
sure, hope the complete log helps:
SSH_SK_PROVIDER=<path>/winhello.dll ssh-keygen -vvv -t ecdsa-sk -f ./fido
Generating public/private ecdsa-sk key pair.
You may need to touch your authenticator to authorize key generation.
debug3: start_helper: started pid=7640
debug3: ssh_msg_send: type 5
debug3: ssh_msg_recv entering
debug1: start_helper: starting /usr/sbin/ssh-sk-helper
debug1: sshsk_enroll: provider "<path>/winhello.dll", device "(null)", application "ssh:", userid "(null)", flags 0x01, challenge len 0
debug1: sshsk_enroll: using random challenge
debug1: sshsk_open: provider <path>/winhello.dll implements version 0x00070000
init_winhello: WARNING! This should not be like this! WinHello API Error: Is user available=0, User=0.
client_converse: receive: unexpected internal error
debug3: reap_helper: pid=7640
reap_helper: helper exited abnormally
Key enrollment failed: unexpected internal error
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFM2DPLS3GTJS2P6XLDDRLS3LWCXANCNFSM4WPXHCMQ>
.
|
I think it is because of mobaXterm launching terminal as a child process, but I'm not sure skdebug(__func__, "debug msg 1"); in src/winhello.c before line 296, after line 296 and after line 298 and re-compile and re-run it to see how far my code is going before crash? |
Added statements here:
Debug statements not showing up.
|
Weird, all the lines between init and GetForegroundWindow are just memory
allocation and variable assignments. If you can, add a debug line between
all the lines to be able to specify exactly which line is causing the crash.
…On Sat, Jan 23, 2021 at 11:27 PM denniskniep ***@***.***> wrote:
Debug statements not showing up.
I added further debug lines to make sure modifications are compiled
sk_enroll: START
init_winhello: TEST v1
init_winhello: WARNING! This should not be like this! WinHello API Error: Is user available=0, User=0.
client_converse: receive: unexpected internal error
debug3: reap_helper: pid=13470
reap_helper: helper exited abnormally
Key enrollment failed: unexpected internal error
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFM2DP76SOMK6AJ3FEOZXTS3MS4HANCNFSM4WPXHCMQ>
.
|
Also please verify that your compiled file and openssh has same architecture(x86 or x64) |
compiled file and openssh has same architecture (checked with file)
Added following debug statements:
and
Result is:
....really weird |
I'll try to check it when I have more time. |
Thanks a lot for your help! I have to make a correction: Sorry for that, but that should not make any trouble, right? |
autoreconf is correct, without it I think you can't compile at all. |
Hi @tavrez, |
Hey, |
Could you tell me all the steps you made? (from installation of mobaXterm and required tools) |
I tried the following setup on two different windows computers: Install MobaXTermDownload MobaXterm Install MobaXterm Start Session > Shell > Bash
Install Dependencies to MobaXTerm CygwinDownload Cygwin 32 bit Installer Execute Installer and choose: MobaXTerm cygwin root directory (C:\Users<name\Documents\MobaXterm\slash) Choose View: Full Select Packages:
Compile sk-winhelloDownload https://github.com/tavrez/openssh-sk-winhello/releases/download/v2.0.0/winhello-2.0.0.tar.gz make install (also copies winhello.dll to /usr/lib) Execute keygenExecute
|
alright, now I can reproduce. |
Quick & dirty fix which worked for me: BOOL user = 0;
int isUserAvailable = webAuthNIsUserVerifyingPlatformAuthenticatorAvailable(&user);
if (isUserAvailable == 0 && user == 1)
return 0;
skdebug(__func__, "WARNING! ..."); |
the bug is a race condition inside 32 bit version of |
Thank you very much for your support and efforts! |
No prob, did that fix worked for you? |
Now I am prompted for the FIDO Authenticator. After touching the FIDO Authenticator there is a "unexpected internal error"
After drilling down with prints it seems that it is crashing now at this line: openssh-sk-winhello/src/winhello.c Line 305 in 4c31674
Same error on both of my workstations. Is it fully working for you and generating the private key? Any ideas? |
May I know what kind of key are you using? This step is after key generation, means Winhello returned success without any issues, but I try to run multiple times to see if it's another race condition or not. |
I use Yubico Security Key NFC |
Seems like the problem is related to fork in cygwin 32-bit apps.
When I call Windows Hello in a simple app in 32-bit cygwin it works, but when I call it in OpenSSH(which use fork to call |
Hello,
first of all thanks for your awesome work!
I am using your released binaries v2.0.0 with gitforwindows with OpenSSH_8.4p1 and it worked like a charm.
Now I am trying to make it running with MobaXTerm (cygwin)
What i have done so far:
./setup-x86.exe -root <path> -q -P gcc-core -P gcc-g++ -P libssl-deve -P automake -P autoconf -P libtool
autoconf --install
./configure
make
Executed
SSH_SK_PROVIDER=<path>/winhello.dll ssh-keygen -vvv -t ecdsa-sk -f ./fido
After a warning (already read in other issues, that this should be no problem):
WinHello API Error: Is User available=0, User=0
Then the following error is returned:
Any ideas what could be the problem?
The text was updated successfully, but these errors were encountered: