Hi all!
I am playing with Virtual U2F Passthrough with a Yubikey on a Chromebook, through Crostini/termina.
Here is the setup:
0. plug the yubikey in
1. vmc key-attach termina /dev/hidraw10
2. vmc start termina (to SH into termina)
3. add the hidraw device to the lxc container
Now in the container I can correctly list credentials, e.g. ssh-keygen -K.
Unfortunately, I can't produce any attestation. When I try, I insert the PIN, the yubikey blinks, and then the process freezes.
I have been doing some experiments through go-libfido2 and it seems that it freezes at different points of the protocol. In a run it got to asking the device to generate credentials, in another it blocked when trying to open the device, etc etc.
Anybody knows what's going on? I _think_ it's a bug in crosvm, but haven't had a chance to try with another VM type, only with termina.
Here are logs of a run where it hangs, in case they are useful:
[I] aldur@lxc-nixos ~/go-libfido2 (master)> FIDO_DEBUG=1 FIDO2_EXAMPLES=1 go test -v -run ExampleDevice_MakeCredential
=== RUN ExampleDevice_MakeCredential
2025/07/29 18:21:42 [DEBG] Finding devices...
run_manifest: found 1 hid device
run_manifest: found 0 nfc devices
list_readers: SCardListReaders 0x8010002e
fido_pcsc_manifest: list_readers 0x8010002e
run_manifest: found 0 pcsc devices
2025/07/29 18:21:42 Using device: &{Path:/dev/hidraw0 ProductID:-3632 VendorID:6353 Manufacturer: Product:HID 18d1:f1d0}
before opening device
fido_tx: dev=0x3c6687a0, cmd=0x06
fido_tx: buf=0x3c6687a0, len=8
0000: da e1 21 c3 98 38 32 eb
fido_rx: dev=0x3c6687a0, cmd=0x06, ms=-1
rx_preamble: buf=0x7ffb088838, len=64
0000: ff ff ff ff 86 00 11 da e1 21 c3 98 38 32 eb 0b
0016: ed 10 9b 02 05 04 03 05 00 00 00 00 00 00 00 00
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx: payload_len=17
fido_rx: buf=0x3c6687a8, len=17
0000: da e1 21 c3 98 38 32 eb 0b ed 10 9b 02 05 04 03
0016: 05
fido_dev_get_cbor_info_tx: dev=0x3c6687a0
fido_tx: dev=0x3c6687a0, cmd=0x10
fido_tx: buf=0x7ffb088890, len=1
0000: 04
fido_dev_get_cbor_info_rx: dev=0x3c6687a0, ci=0x3c677f30, ms=-1
fido_rx: dev=0x3c6687a0, cmd=0x10, ms=-1