[snap] Chromium can enumerate USB devices without the raw-usb plug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
chromium-browser (Ubuntu) |
New
|
Medium
|
Unassigned |
Bug Description
Version:
chromium 87.0.4280.66 1411
Steps to reproduce:
1. Have Chromium snap, with raw-usb plug disconnected.
2. Open Chromium and try to use a webpage that has webusb.
Result:
USB.getDevices() and USB.requestDevice() will succeed but USBDevice.open() will fail, emitting "DOMException: Permission Denied" on the browser console. Or, put another way, you can select a USB device that you want the webpage to use, but it is impossible for the webpage to actually use it.
Why this happens:
Chromium enumerates USB devices by querying udev. It does not require elevated permissions beyond the snap defaults in order to do this. So it can retrieve a list of USB devices even without raw-usb.
Impact:
It is impossible to access the USB devices until the raw-usb plug is connected. However, to a normal user, it appears that Chromium already has USB permissions because it can enumerate devices. The webusb API is in a confusing, partially-working state, and there is nothing to indicate that Chromium needs additional permissions in order for it to fully work.
tags: | added: snap |
Changed in chromium-browser (Ubuntu): | |
importance: | Undecided → Medium |