I’m trying to use a signet (which is a USB hardware password manager) in Qubes 4.2. It worked fine in 4.1, but after I did a fresh install of 4.2, it doesn’t work. The device passes through and shows up in the target qube, but doesn’t receive any commands sent to /dev/hidraw0 (which I verified with a UART from the device itself).
I believe this is an issue with Qubes 4.2, but I wanted to see if anyone here first. My main two questions are:
- Does anyone know about any USB packet filtering for hidraw devices, that started happening in 4.2?
- Does anyone know where I should look next to get more information?
Debugging done so far
When the device is first plugged in, I see it in the syslogs of sys-usb using sudo journalctl -f
and everything looks fine.
When I pass it through to a qube, it seems to attach just fine. It says “Attaching device” and there’s no errors that pop up.
However, when I attach it, sys-usb immediately starts printing out errors related to usbip:
Feb 05 13:49:06 sys-usb kernel: usbip-host 2-6.3: urb completion with non-zero status -71
Feb 05 13:49:06 sys-usb kernel: usbip-host 2-6.3: urb completion with non-zero status -71
Feb 05 13:49:06 sys-usb kernel: usbip-host 2-6.3: urb completion with non-zero status -71
Feb 05 13:49:07 sys-usb kernel: usbip-host 2-6.3: urb completion with non-zero status -71
Looking at the kernel version, we see this:
Linux sys-usb 6.1.62-1.qubes.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 14 06:16:38 GMT 2023 x86_64 GNU/Linux
Looking at the kernel source for that kernel version, we see that -71 is -EPROTO.
Meanwhile, in the qube, the syslog has errors related to usb:
Feb 05 13:33:18 adam-hax0rbana-no-tor kernel: usb 1-1: reset full-speed USB device number 2 using vhci_hcd
Feb 05 13:33:18 adam-hax0rbana-no-tor kernel: vhci_hcd: vhci_device speed not set
Feb 05 13:33:18 adam-hax0rbana-no-tor kernel: usb 1-1: SetAddress Request (2) to port 0
Feb 05 13:33:18 adam-hax0rbana-no-tor kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Feb 05 13:33:19 adam-hax0rbana-no-tor kernel: vhci_hcd: vhci_device speed not set
Feb 05 13:33:19 adam-hax0rbana-no-tor kernel: usb 1-1: reset full-speed USB device number 2 using vhci_hcd
Feb 05 13:33:19 adam-hax0rbana-no-tor kernel: vhci_hcd: vhci_device speed not set
Feb 05 13:33:19 adam-hax0rbana-no-tor kernel: usb 1-1: SetAddress Request (2) to port 0
Feb 05 13:33:20 adam-hax0rbana-no-tor kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Now, if we just ignore these errors, we see that /dev/hidraw0 and /dev/hidraw1 both appear in the target qube, which is the expected behavior. The signet client software opens /dev/signet (which is symlinked to /dev/hidraw0 via a udev rule), it successfully opens the handle and send the startup message to said file handle. It never gets a response.
Using a UART port on the USB device itself, I confirmed that the message never makes it to the device.
Between the errors in the logs, and the message not getting from the target qube to the device, it seem like the attach command is failing in some way which is causing data to not make it through to the qube.
Variations
I’ve tried varying some things to see if I can narrow down the issue, but it persists in all of the cases below:
- Plug directly into the computer instead of using a USB hub
- Try a different signet device (same model, different physical instance)
- Attach it to a different qube
- Try the device in another computer (it works fine on a Debian 12 machine)
- Run the signet client from sys-usb; it acted just like in the target qube where it could open the device and send data, but then it never gets a reply