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

user_id behavior mismatch with OpenSSH #14

Open
carlreinke opened this issue Feb 28, 2022 · 1 comment
Open

user_id behavior mismatch with OpenSSH #14

carlreinke opened this issue Feb 28, 2022 · 1 comment

Comments

@carlreinke
Copy link

wchar_t lUserId[32] = L"SSH User";
if (strcmp(user_id, "") && (convert_byte_string(user_id, strlen(user_id) + 1, lUserId) <= 0))
{
skdebug(__func__, "convert_string user_id failed");
goto out;
}
WEBAUTHN_USER_ENTITY_INFORMATION userInfo = {WEBAUTHN_USER_ENTITY_INFORMATION_CURRENT_VERSION, strlen(user_id) + 1, user_id, lUserId, NULL, lUserId};

This doesn't match OpenSSH but not for the reasons mentioned in the README.

OpenSSH always uses 32 bytes for user_id. I.e., WEBAUTHN_USER_ENTITY_INFORMATION.cbId should always be 32 and not be based on strlen. If the user didn't specify anything, user_id will contain 32 zero bytes.

https://github.com/openssh/openssh-portable/blob/V_8_9_P1/sk-usbhid.c#L839

@tavrez
Copy link
Owner

tavrez commented Mar 1, 2022

Thanks for pointing this, I'll fix it with the next version which has the support for OpenSSH 8.9

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

No branches or pull requests

2 participants