From: Greg KH <gregkh@linuxfoundation.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Bin Wang <binw@marvell.com>,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Norbert Ciosek <norbertciosek@gmail.com>
Subject: Re: [GIT PULL] char/misc driver patches for 3.16-rc1
Date: Tue, 3 Jun 2014 11:25:55 -0700 [thread overview]
Message-ID: <20140603182555.GA28541@kroah.com> (raw)
In-Reply-To: <CA+55aFwMEigYZGeF4sFTSpmnvb8YQ3hOndjNrd9ObL2EdOptgQ@mail.gmail.com>
On Tue, Jun 03, 2014 at 10:14:41AM -0700, Linus Torvalds wrote:
> On Tue, Jun 3, 2014 at 10:02 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > Hm, I got two different bug reports, and this same patch from two
> > different people insisting that we broke their drivers with the above
> > patches, and asked for this patch to be applied.
>
> So I do think that we might be able to apply this patch, but I think
> it needs a *lot* more thought than was obviously spent on it so far.
>
> For example, right now it's actively insecure. Do we care? Maybe we
> don't. The user-space uio side presumably is root-owned, and hopefully
> trusted.
It better be trusted, as userspace has access to the "raw" hardware
here, and is getting notified about every irq that happens to the
device.
> And what about the unaligned mmio case? Are people somehow
> guaranteeing that the regions is page-aligned, even if it isn't
> page-sized?
>
> What is the actual hardware in question?
Here are two email threads that I had about this, first from Bin that
is the patch I applied:
https://lkml.org/lkml/2014/3/25/11
And this one with Nobuhiro that goes into details a bit more:
https://lkml.org/lkml/2014/3/11/707
Showing how a small memory window of the device is now broken without
this change.
And this one that didn't get an answer from anyone from Norbert:
https://lkml.org/lkml/2014/4/18/47
showing how the changes you referred to broke his hardware access as
well for the same reasons.
Bin, Nobuhiro, Norbert, anything else you want to bring up about this as
your hardware is affected?
Norbert, it is commit ddb09754e6c7239e302c7b675df9bbd415f8de5d now in
Linus's tree.
> Basically, it's an obvious security issue, and we shouldn't just say
> "whatever". But maybe - with lots of commentary about why the security
> implications aren't actually bad in _practice_, and why things are
> always page-aligned even if they aren't page-sized, we can say "ok,
> it's wrong, but we can still do it because xyz".
I think that if the size of the io range is smaller than a page, we
still want to give access to the hardware. I guess we can require that
userspace ask for the whole page size, but even if we do that, it's
still accessing data "off the end" of the device and that is unknown
what's going to happen as we are mmaping physical memory here, not
virtual.
thanks,
greg k-h
next prev parent reply other threads:[~2014-06-03 18:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 5:44 [GIT PULL] char/misc driver patches for 3.16-rc1 Greg KH
2014-06-03 15:32 ` Linus Torvalds
2014-06-03 17:02 ` Greg KH
2014-06-03 17:14 ` Linus Torvalds
2014-06-03 18:25 ` Greg KH [this message]
2014-06-07 10:41 ` Pavel Machek
2014-06-07 10:42 ` Pavel Machek
2014-06-07 22:02 ` One Thousand Gnomes
2014-06-17 23:06 ` Greg KH
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=20140603182555.GA28541@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=binw@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nobuhiro.iwamatsu.yj@renesas.com \
--cc=norbertciosek@gmail.com \
--cc=torvalds@linux-foundation.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