From: "Daniel P. Berrange" <berrange@redhat.com>
To: Jeremy White <jwhite@codeweavers.com>
Cc: hdegoede@redhat.com, spice-devel@lists.freedesktop.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.
Date: Wed, 1 Jul 2015 10:06:19 +0100 [thread overview]
Message-ID: <20150701090619.GB16822@redhat.com> (raw)
In-Reply-To: <1435700650-640-2-git-send-email-jwhite@codeweavers.com>
On Tue, Jun 30, 2015 at 04:44:10PM -0500, Jeremy White wrote:
> This module uses the usbredir protocol and user space tools,
> which are used by the SPICE project.
>
> Signed-off-by: Jeremy White <jwhite@codeweavers.com>
[snip]
> diff --git a/drivers/usb/usbredir/Kconfig b/drivers/usb/usbredir/Kconfig
> new file mode 100644
> index 0000000..284fd02
> --- /dev/null
> +++ b/drivers/usb/usbredir/Kconfig
> @@ -0,0 +1,25 @@
> +config USBREDIR
> + tristate "USBREDIR support"
> + depends on USB && NET
> + ---help---
> + This enables connecting a remote USB device over IP using
> + the USBREDIR protocol. This module provides a sysfs attach
> + interface which, if given a socket connected to a remote
> + usbredirserver, will enable the remote device to behave as
> + though it were connected to the system running this module.
> +
> + For more information and user space tools, refer to the
> + USBREDIR project, which can be found at
> + http://www.spice-space.org/page/UsbRedir.
[snip]
> new file mode 100644
> index 0000000..217a2e4
> --- /dev/null
> +++ b/drivers/usb/usbredir/README
> @@ -0,0 +1,20 @@
> +USB Redirection Kernel Module
> +
> +This module allows a Linux system to instatiate USB devices
> +that are located on a remote device. The USB data is transferred
> +over a socket using the USBREDIR protocol, which is generally
> +used in conjunction with the SPICE project.
> +
> +You will need the USBREDIR user space tools. They can
> +be found at http://www.spice-space.org/page/UsbRedir.
> +
> +To use, start the usbredirserver on a remote system.
> +For example,
> + ./usbredirserver --port 4000 125f:db8a
> +will export my ADATA thumb drive on the remote system.
> +
> +Next, on the local system, connect a socket and relay that to
> +the kernel module. The connectkernel utility will do this as follows:
> + ./connectkernel adata4000 my.remote.device.com 4000
> +
> +The device should attach and be usable on the local system.
What is the security story here ? If I am understanding correctly, you have
a userspace helper which opens a socket, and does a connect() to establish
the connection to the remote system, and then tells the kernel to use the
file descriptor associated with the socket.
Assuming that's correct, then this seems to imply that the socket has raw
plain text data being sent/received, and thus precludes the possibility
of running any security protocol like TLS unless the kernel wants to have
an impl of the TLS protocol.
I don't really think it is sensible to be defining & implementing new
network services which can't support strong encryption and authentication.
Rather than passing the file descriptor to the kernel and having it do
the I/O directly, I think it would be better to dissassociate the kernel
from the network transport, and thus leave all sockets layer data I/O
to userspace daemons so they can layer in TLS or SASL or whatever else
is appropriate for the security need.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
next prev parent reply other threads:[~2015-07-01 9:06 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 21:44 [RFC PATCH 0/1] RFC - Implement a usbredir kernel module Jeremy White
2015-06-30 21:44 ` [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP Jeremy White
2015-06-30 23:48 ` Greg KH
2015-07-01 3:34 ` Jeremy White
2015-07-01 5:44 ` Greg KH
2015-07-01 15:55 ` Jeremy White
2015-07-01 16:13 ` Greg KH
2015-07-01 18:39 ` Hans de Goede
2015-07-07 16:47 ` Jeremy White
2015-07-08 7:11 ` Hans de Goede
2015-07-09 0:19 ` Jeremy White
2015-07-01 9:06 ` Daniel P. Berrange [this message]
2015-07-01 18:31 ` [Spice-devel] " Jeremy White
2015-07-01 18:45 ` Hans de Goede
2015-07-02 8:45 ` Oliver Neukum
2015-07-02 11:35 ` Hans de Goede
2015-07-02 12:10 ` Oliver Neukum
2015-07-02 15:57 ` Jeremy White
2015-07-02 18:46 ` Oliver Neukum
2015-07-02 19:02 ` Jeremy White
2015-07-02 19:59 ` Alan Stern
2015-07-02 20:06 ` Jeremy White
2015-07-02 20:20 ` Alan Stern
2015-07-03 8:51 ` Krzysztof Opasiak
2015-07-03 14:04 ` Alan Stern
2015-07-06 8:20 ` Oliver Neukum
2015-07-06 20:14 ` Jeremy White
2015-07-06 20:22 ` Alan Stern
[not found] ` <mnlh2b$1cs$1@ger.gmane.org>
2015-07-22 14:03 ` Jeremy White
2015-07-22 14:34 ` Greg KH
2015-07-22 16:55 ` Jeremy White
2015-07-22 17:59 ` Sean O. Stalley
2015-07-23 0:20 ` Jeremy White
2015-12-09 22:32 ` Jeremy White
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150701090619.GB16822@redhat.com \
--to=berrange@redhat.com \
--cc=hdegoede@redhat.com \
--cc=jwhite@codeweavers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=spice-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox