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

nitrocli (for NK2 Pro) not responsive while NK3 plugged in #188

Closed
KaoriRinaFujimoto opened this issue Apr 16, 2022 · 4 comments
Closed
Assignees

Comments

@KaoriRinaFujimoto
Copy link

KaoriRinaFujimoto commented Apr 16, 2022

first of all thanks for this great utility.
Been using nitrocli with my NK2 Pro for the past 1.5 years and everything has been working great so far when using by itself.

However recently I've received my NK3s and set them up to use for webauth (FIDO2) and SSH into all my machines. Since NK3 doesn't support PGP operations and password management (yet) I'm going to use both devices -- which is not a huge deal, except that nitrocli won't respond once the NK3 is plugged in.

I'm running nitrocli v 0.4.1 on arch and can access my NK2 Pro perfectly fine while plugged in alone.
Once I plug in a NK3 nitrocli won't respond anymore to basic commands like nitrocli list or nitrocli status. I've tried all available USB A ports on my PC / dock without success. Running journalctl -f shows that both NKs are being recognized by the system.
Even referring to the NK2 Pro by serial number with nitrocli status --serial-number 0x0000abcd or USB path nitrocli status --usb-path 1-2:3.4 does not work. Running these commands with highest verbosity unfortunately does not output anything as well.

Once I unplug the NK3 everything works well again.

Is anyone having similar issues or any ideas how to troubleshoot that?
Thanks

@KaoriRinaFujimoto KaoriRinaFujimoto changed the title nitrocli for Nitrokey 2 Pro not responsive after plugging while a Nitrokey 3 is plugged in nitrocli (for NK2 Pro) not responsive while NK3 plugged in Apr 16, 2022
@robinkrahl
Copy link
Collaborator

Thanks for the report! This is a known issue in libnitrokey and will be fixed with the next release.

Possible workarounds until the release:

  • Compile libnitrokey from the current master, install it and set the USE_SYSTEM_LIBNITROKEY environment variable while compiling nitrocli.
  • Change Cargo.toml to use a local copy of nitrokey-sys and apply the linked patch to the libnitrokey source included in nitrokey-sys.

@d-e-s-o
Copy link
Owner

d-e-s-o commented Apr 27, 2022

Thanks for the quick analysis (and the fix!) @robinkrahl! I see libnitrokey v3.7 has been cut and includes the fix. Will you update nitrokey-sys to use this new version so that we can have the issue fixed in nitrocli?

@d-e-s-o d-e-s-o self-assigned this Apr 30, 2022
d-e-s-o added a commit that referenced this issue Apr 30, 2022
This change updates the nitrokey-sys crate to version 3.7.0. This
one-time bump of a transitive dependency is necessary to get a fix for
an endless loop in libnitrokey when FIDO2 devices are present.

Fixes #188
@KaoriRinaFujimoto
Copy link
Author

just wanted to thank you guys for the quick fix! Working like a charm

@robinkrahl
Copy link
Collaborator

robinkrahl commented Oct 11, 2022 via email

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

3 participants