All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "Dr. David Alan Gilbert" <linux@treblig.org>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>,
	Jidong Xiao <jidong.xiao@gmail.com>,
	david@lang.hm, Cong Wang <xiyou.wangcong@gmail.com>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Can we move device drivers into user-space?
Date: Mon, 27 Feb 2012 08:29:15 -0300	[thread overview]
Message-ID: <4F4B690B.3010707@redhat.com> (raw)
In-Reply-To: <20120226015820.GB18931@gallifrey>

Em 25-02-2012 23:58, Dr. David Alan Gilbert escreveu:
> * Mauro Carvalho Chehab (mchehab@redhat.com) wrote:
>> Em 25-02-2012 13:10, Eduard - Gabriel Munteanu escreveu:
>>> On Fri, Feb 24, 2012 at 04:21:09PM -0200, Mauro Carvalho Chehab wrote:
>>>> Moving a buggy driver to userspace won't fix the bug. You're just moving
>>>> it from one place to another place. Also, the code will likely require changes
>>>> to work on userspace, so, the chances are that you're actually introducing more
>>>> bugs.
>>>
> 
> <snip>
> 
>>>> That's said, there are much more eyes inspecting the kernel sources than on any 
>>>> other userspace project. So, the risk of a bad code to be inserted unnoticed at
>>>> the Linux kernel is degrees of magnitude lower than on an userspace driver.
>>>
>>> Those much more eyes have already missed important bugs in the past.
>>
>> Yes, nobody is perfect. But the probability that something passes on a 4000+ people
>> review is lower than the probability of a bug on a piece of code where just one 
>> or two people are looking on it.
> 
> That there are 4000+ people reading a driver is a big assumption; for common
> drivers I'd agree - one problem though is there are a lot of drivers for obscure
> hardware or old/dead hardware/protocols that frankly near to nobody cares about.

Drivers for dead hardware won't offer security risks: those drivers will not load,
as such hardware won't be found at the machine. The same applies to old hardware drivers:
they won't run on modern machines.

Yet, even those old/dead drivers have people looking into it. I receive lots of patches
from the janitors team touching those old stuff, fixing potential issues on them.

If the userspace drivers become fragmented into hundreds of independent projects,
I doubt that most of those projects would have a janitors or a security team. Yet,
they can offer security risks.

> Very few people read those drivers; yet sometimes they get built and distributed
> and someone then finds that since no one has looked at them they're full of holes,
> and given a malicious USB device for example, you can suddenly create one of these
> devices that only 3 people have bothered to read the source to - 5 years ago.
> (The Econet security bug recently would be an example of that).

If a malicious person has physical access to the hardware, he can certainly compromise
the machine even without an USB device: if he powers off the machine, a DoS is caused;
if he stoles the hard disks, confidentiality is compromised; if he boots a live CD,
he can insert malicious code there, etc.

> There is a line which says that things that really aren't used
> just shouldn't be built; but then there are things that are only used
> by a few people, and then ones only used by a few organisations - and
> it gets very difficult to say at what point you say just turn it off.

True. If such organizations have high security requirements, they should be hardening 
the OS, disabling anything that allows to load a driver at runtime. The consulting
services for it I've worked with in the past generally disables not only all unused
drivers, but also any other drivers that would allow the usage of external media
(USB, CD rom, memory stick drivers) and userspace ones.

Regards,
Mauro

  parent reply	other threads:[~2012-02-27 11:29 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23  4:56 Can we move device drivers into user-space? Jidong Xiao
2012-02-23 15:57 ` Cong Wang
2012-02-23 16:34   ` Jidong Xiao
2012-02-23 20:48     ` david
2012-02-23 21:01       ` Jidong Xiao
2012-02-24 18:21         ` Mauro Carvalho Chehab
2012-02-25 15:10           ` Eduard - Gabriel Munteanu
2012-02-26  0:06             ` Mauro Carvalho Chehab
2012-02-26  0:29               ` Richard Yao
2012-02-27 11:31                 ` Mauro Carvalho Chehab
2012-02-26  1:58               ` Dr. David Alan Gilbert
2012-02-26  3:34                 ` arts zhao
2012-02-27 11:29                 ` Mauro Carvalho Chehab [this message]
2012-02-25 15:31           ` Richard Yao
2012-02-23 21:18       ` Roland Dreier
2012-02-24 15:19 ` Jidong Xiao
2012-02-24 15:38   ` Greg KH
2012-02-24 16:38     ` Jidong Xiao
2012-02-24 16:54       ` Greg KH
2012-02-24 17:06         ` Jidong Xiao
2012-02-24 17:13           ` Greg KH
2012-02-24 17:21             ` Jidong Xiao
2012-02-24 17:31               ` Greg KH
2012-02-25  2:33             ` Richard Yao
2012-02-25  4:28               ` Jidong Xiao
2012-02-24 17:10         ` Al Viro
2012-02-25 19:23         ` Jidong Xiao
2012-02-25 20:55           ` Greg KH
2012-02-25 23:43             ` Jidong Xiao
2012-02-26 17:40               ` Greg KH
2012-02-26 22:46             ` Greg KH
2012-02-27 11:17       ` Bernd Petrovitsch
2012-02-24 17:07     ` Guenter Roeck
2012-02-24 17:17       ` Greg KH
2012-02-24 17:47         ` Guenter Roeck
2012-02-24 18:34           ` Greg KH
2012-02-24 19:15             ` Henrik Rydberg
2012-02-24 19:26               ` Greg KH
2012-02-24 20:10                 ` Henrik Rydberg
2012-02-24 20:16                   ` Greg KH
2012-02-24 20:37                     ` Henrik Rydberg
2012-02-24 20:56                       ` Greg KH
2012-02-24 21:22                         ` Henrik Rydberg
2012-02-24 21:30                           ` Ted Ts'o
2012-02-24 22:14                             ` Henrik Rydberg
2012-02-24 22:20                               ` Greg KH
2012-02-24 22:49                                 ` Henrik Rydberg
2012-02-24 22:54                                   ` Greg KH
2012-02-24 23:14                                     ` Henrik Rydberg
2012-02-25 12:15                               ` Theodore Tso
2012-02-26  9:54                                 ` Henrik Rydberg
2012-02-26  4:56                               ` Bobby Powers
2012-02-26 10:47                                 ` Henrik Rydberg
2012-02-26 12:26                                   ` Richard Yao
2012-02-26 14:23                                     ` Bernd Petrovitsch
2012-02-26 15:29                                       ` Henrik Rydberg
     [not found]                                     ` <365b85cee33d4f1aadc31336663de21c@HUBCAS2.cs.stonybrook.edu>
2012-02-26 15:05                                       ` Richard Yao
2012-02-26 20:30                                         ` Ted Ts'o
     [not found]                                         ` <09a5cca9cffb4300843f682be529e8ca@HUBCAS2.cs.stonybrook.edu>
2012-02-26 21:25                                           ` Richard Yao
2012-02-26 21:35                                             ` Theodore Tso
     [not found]                                             ` <10de0ef9fb5d44c08669191e12343a97@HUBCAS2.cs.stonybrook.edu>
2012-02-26 22:03                                               ` Richard Yao
2012-02-27 11:17                                                 ` Bernd Petrovitsch
2012-02-26 23:08                                   ` david
2012-02-27  0:01                                     ` Henrik Rydberg
2012-02-27  0:53                                       ` david
2012-02-27  9:07                                         ` Henrik Rydberg
2012-03-01  9:54           ` Thomas Gleixner
2012-02-24 15:58   ` Valdis.Kletnieks

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=4F4B690B.3010707@redhat.com \
    --to=mchehab@redhat.com \
    --cc=david@lang.hm \
    --cc=eduard.munteanu@linux360.ro \
    --cc=jidong.xiao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=xiyou.wangcong@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.