[snap] Chromium can enumerate USB devices without the raw-usb plug

Bug #1905457 reported by Alistair Buxton
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)

Bug Description


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.


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.


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: snap
Olivier Tilloy (osomon)
tags: added: snap
Changed in chromium-browser (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.