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

NK_list_devices() hangs with plugged in Nitrokey FIDO2 device #193

Closed
daringer opened this issue Dec 14, 2020 · 1 comment · Fixed by #195
Closed

NK_list_devices() hangs with plugged in Nitrokey FIDO2 device #193

daringer opened this issue Dec 14, 2020 · 1 comment · Fixed by #195

Comments

@daringer
Copy link

daringer commented Dec 14, 2020

Bug report: The NK_list_devices() C-API call, while a Nitrokey FIDO2 device is plugged in, will never return and load one cpu.

How to reproduce:

  • make sure you have a Nitrokey FIDO2 and a Nitrokey Pro (2) / Storage (2) plugged in
  • libnitrokey and its headers must be installed
  • create a file (and save it as nk.cc) with the following content:
#include <libnitrokey/NK_C_API.h>
#include <iostream>

using namespace std;

int main() {
	struct NK_device_info* x = NK_list_devices();
	cout << x->model << endl;
	cout << x->path << endl;
	cout << x->serial_number << endl;
}
  • compile it using: g++ nk.cc -o nk -lnitrokey -I/usr/include
  • run it: ./nk

Observed behavior: The executable will hang inside the NK_list_devices() call

Expected behavior: The executable should return immediately, while ignoring any other devices

Environment:

  • Arch Linux (Kernel 5.9.12-arch1-1, AMD64)
  • libnitrokey version 3.6 (package release 1)
  • Nitrokey FIDO2 & Nitrokey Pro 2
@robin-nitrokey
Copy link
Member

I have the same issue with libnitrokey 3.6 on Debian with kernel 5.10.0-0.bpo.4-amd64.

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

Successfully merging a pull request may close this issue.

2 participants