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

Ease creating USB VM even if USB keyboard is used #3516

Open
marmarek opened this Issue Feb 1, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@marmarek
Member

marmarek commented Feb 1, 2018

Even if the system have only one USB controller, and only USB keyboard, creating USB VM, with qubes.InputKeyboard service, part of input-proxy, enabled still makes some sense. While USB VM will be able to spy and/or subvert the keyboard, user will see resulting actions. Malicious USB device will not be able to exploit some dom0 kernel driver, silently in the background. And when bundled with some 2FA, malicious USB VM will not be able to unlock the screen on its own.

Besides enabling qubes.InputKeyboard service, there is one more problem: USB controllers are blacklisted in dom0 (specifically: connected to xen-pciback driver, before loading actual USB controllers drivers) - this prevents entering LUKS passphrase using USB keyboard.

For now, lets ease the basic thing:

  • do not blacklist USB controllers early (only just before actual starting USB VM)
  • enable qubes.InputKeyboard service

To (semi-)securely use it, user is responsible for disconnecting any untrusted USB device from the system for the boot time. Note that this (unfortunately) should be a standard routine even in non-USB keyboard case, because BIOS (also having USB drivers) potentially could be exploited by malicious device at early boot stage too.

Later, we can employ additional protection, using usb device authorization, to allow only HID devices and only for the LUKS passphrase entering time. This is still far less protection than USB VM + input-proxy, but something better than allowing all devices.

Some long term solution could be bundling minimal USB VM with input-proxy into initramfs, but at this level of complexity (and required work), it may be better to simply adjust hardware configuration instead (like installing separate USB controller for this).

This is related to #2959, #2116, #3203

@marmarek marmarek added the enhancement label Feb 1, 2018

@marmarek marmarek added this to the Release 4.0 milestone Feb 1, 2018

marmarek added a commit to marmarek/qubes-mgmt-salt-dom0-virtual-machines that referenced this issue Feb 2, 2018

Support pillar qvm:sys-usb:name = sys-net
Better way for using sys-net as both NetVM and UsbVM. Keep old state
(qvm.sys-net-with-usb) for compatibility with the current firstboot.
Create also qvm.sys-net-with-usb pillar file (not state file), to easily
enable this configuration.

This will ease creating more USB VM related states.

QubesOS/qubes-issues#3516

marmarek added a commit to marmarek/qubes-mgmt-salt-dom0-virtual-machines that referenced this issue Feb 2, 2018

Create qvm.usb-keyboard state
This is the most basic USB keyboard setup:
 - do not hide USB controllers from dom0 on early boot (for LUKS
   passphrase entering)
 - enable qubes.InputKeyboard service

See QubesOS/qubes-issues#3516 for details.

@marmarek marmarek referenced this issue in QubesOS/qubes-mgmt-salt-dom0-virtual-machines Feb 2, 2018

Merged

Simplified USB keyboard setup #6

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Feb 2, 2018

Member
Member

adrelanos commented Feb 2, 2018

marmarek added a commit to marmarek/qubes-installer-qubes-os that referenced this issue Mar 2, 2018

qubes-anaconda-addon: adjust usbvm setup to simplified states
Don't use separte state for combined sys-net+sys-usb. Instead, use
pillar to adjust sys-usb state.

QubesOS/qubes-issues#3516
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment