-
Notifications
You must be signed in to change notification settings - Fork 5
Device detection in export VMs is unreliable #18
Comments
My findings so far: The bus and device IDs are useless, as reported in the other issue. Fingerprinting USB devices would let us reliably identify devices that have serial numbers, but many flash drives don't, so they look the same. I've been unable to find any distinguishing attribute for some cheap SMI sticks I've got; they're all identical under This is all OK, because the persistent attachment isn't what we want in the long run anyway. It complicates provisioning, keeps The Qubes core admin API makes it possible to write an extension loaded by So we're left with having the script run in There is a way we could eliminate the need for manual attachment, at least for storage devices. If we control the disk format of export sticks, we could add a marker (like a partition with a certain label) that would let the enumeration script run in |
Thanks for the recap, John! I've nominated this for discussion in our Monday client check-in (at 12:30 PM EDT): |
Regarding printer detection, from discussion from @rmol privately that with the printers we have tested so far that do appear to be fingerprintable (they include a distinct serial ID number) - if that is broadly true (needs investigation since we've only tested with two) then we wouldn't need similar logic for printer attachment. We'd keep some data store of allowed printers in dom0 and then attach them as they are seen. |
RecapTo recap today's quick client sync, we discussed this issue and what it would take to auto-attach a new device to
Open questions
|
Some thoughts on the above:
if the USB drive is not a valid transfer device we should return an error code - Regarding printers, unless there's some security advantage that I'm not seeing to disallowing printing to a printer the user manually attaches, we should not block that action.
in these cases I think we should return |
Currently
Yeah, I aslo don't see a security advantage. I guess I was building off of the proposal of only auto-attaching verified printers (printers that have a serial number in our maintained printer list). If we allow any printer to be attached and printed to then it might make sense to just auto-attach any printer device to |
I think the three scenarios to consider are:
|
So let's assume we're able to get rid of persistent attachment, then there's no need for us to spend time on trying to make the current delete
|
thanks @creviera your proposal makes a lot of sense
is this because there might be a USB connected, but it's not got the correct partition name?
What do you think having instead of one message we have two error messages i.e. one for |
No, it's because I think we should just delete this whole method and simplify the code and number of back and forth calls between the client and export vm by consolidating
Sounds good to me. It's better since it's not really an error rather an unsupported feature. We will eventually need to provide the user with a way to select a device from a menu, and it would make most sense to do this from the Export VM rather than the client. I'll open up another discussion ticket for this to elaborate and to ask questions. If we continue to try to steer the user away from using the OS's USB attachment menu, we'll have to rewrite a lot of what Qubes is already doing, which we could just be improving. Also we don't plan to block the user from using the Qubes menu afaik so it might be more confusing with multiple ways of doing things. |
We've agreed to use the Other changes to the USB-related logic are tracked in the
|
In freedomofpress/securedrop-workstation#307 (comment) and follow-up comments we discovered that the current method for detecting whether a storage device is detected is unreliable:
sd-export-usb
sometimes shows different bus IDs inlsusb
output thansys-usb
.We've considered various methods to improve reliability, including the abandoned approach in #16 to use
lsblk
, which would only work for storage devices.Our goal is to implement a method to detect connected USB devices reliably in a manner which will work for both print and storage devices, for example, by querying the connected device class.
The text was updated successfully, but these errors were encountered: