lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeZSADZlMGKs3mrz@itl-email>
Date: Mon, 4 Mar 2024 17:58:05 -0500
From: Demi Marie Obenour <demi@...isiblethingslab.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org,
	Marek Marczykowski-Górecki <marmarek@...isiblethingslab.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: usbip doesn't work with userspace code that accesses USB devices

On Mon, Mar 04, 2024 at 09:04:00PM +0000, Greg Kroah-Hartman wrote:
> On Mon, Mar 04, 2024 at 03:01:51PM -0500, Demi Marie Obenour wrote:
> > Qubes OS users are reporting that MTP doesn't work with USB passthrough.
> > Fastboot (used for flashing a custom OS to an Android device) also
> > doesn't work.  Kernel-mode drivers, such as Bluetooth and USB storage,
> > seem to usually work as expected.  Since MTP and fastboot are both
> > implemented in userspace, it appears that there is some problem with the
> > interaction of usbip, our USB proxy (which is based on USBIP), and
> > userspace programs that interact with USB devices directly.
> > 
> > The bug report can be found at [1] and the source code for the USB proxy
> > can be found at [2].  The script used on the sending side (the one with
> > the physical USB controller) is at [3] and the script used by the
> > receiving side (the one the device is attached to) is at [4].  All of
> > these links are for the current version as of this email being sent, so
> > that anyone looking at this email in the future doesn't get confused.
> > 
> > Is this a bug in usbip, or is this due to usbip being used incorrectly?
> 
> I'm amazed that usbip works with usbfs at all, I didn't think that was a
> thing.

If it isn't a thing, then how would one go about making it be a thing?
usbfs not supporting usbip would certainly explain the behavior we are
seeing, but this also means that usbip is not a complete solution for
our use-case.  I had assumed that usbip simply created a new USB device
that was just as functional as any device implemented in hardware.

> If you have a reproducer, or some error messages somewhere, that might
> be the easiest way forward.

Multiple users have 100% reliable reproducers, and I believe (but am not
certain) that Marek can reproduce this problem too.  Writing a
reproducer that doesn't involve Qubes OS or any USB peripherals would be
quite a bit harder, mostly because I can't think of any way to run into
this bug without either having least two machines (either physical or
virtual) or using usbip from a machine to itself (which would be rather
strange and might throw things off).  It would also be necessary to
somehow emulate the USB device in question.

> In reading the bug report, it looks like
> the "bridge" you all made can't handle the device disconnecting itself
> properly?  But that's just a guess, could be anything.

What is the proper way to deal with disconnections?  It's quite possible
that the shell scripts have a bug somewhere, but I'm not sure what it
is.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ