Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1534706
| From | Matthew Garrett <mjg59@srcf.ucam.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) |
| Date | 2016-12-02 08:20 +0100 |
| Message-ID | <sJQit-uF-13@gated-at.bofh.it> (permalink) |
| References | <sJyEV-3Or-7@gated-at.bofh.it> <sJyEV-3Or-25@gated-at.bofh.it> <sJB9L-5sv-5@gated-at.bofh.it> <sJN1f-6yi-1@gated-at.bofh.it> <sJPZ8-5Y-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Dec 02, 2016 at 07:55:30AM +0100, Greg KH wrote: > On Fri, Dec 02, 2016 at 03:07:00AM +0000, Matthew Garrett wrote: > > If root is able to modify the behaviour of verified code after it was > > verified, then the value of that verification is reduced. Ensuring that > > the code remains trustworthy is vital in a number of security use cases. > > Ok, but why are you now deciding to somehow try to "classify" the types > of module parameters? Why would you want to allow irqs to change, but > not iobase? Or something else? Who is going to do this "I want you and > you but not you" decision? Why not just forbid all module parameters at > all if they are so dangerous? If the parameters plausibly make it possible for root to modify the kernel in interesting ways, then restricting them makes sense. My gut sense is that parameters that allow the alteration of the base address of memory mapped devices are clearly a problem in this respect, but port io and IRQs *probably* aren't. On the other hand, blocking mmio base addresses and not blocking the others is kind of inconsistent. > > If root can tell a driver to probe for hardware at a specific address, > > and that driver will then blindly do so, root is trivially able to > > modify arbitrary kernel memory and disable arbitrary security features. > > IRQ or io port attacks are much more difficult to take advantage of, but > > I could imagine that some of them are still plausible. > > Then just mark them all as "bad", why pick and choose? Most parameters are going to be fine, but sure, flagging all IRQ/mmio/pio address parameters seems reasonable. > > Here's an example. The sysfs option to enable module signing is write > > once. If root sets that, root can't unset it. Except there's a whole > > bunch of ways that root *can* unset it, including kexec > > (https://mjg59.dreamwidth.org/28746.html) and a bunch of other things > > that are disabled by this patchset. That feature is entirely useless as > > is. This patchset helps make it useful. > > "this" patchset does nothing to disable anything, so I can't speak to > any of the other goals you might have for that code, that's not what we > are reviewing here. This is prep work that makes it possible to block module parameters that would otherwise make it possible to avoid those restrictions. > > Right now, the secure boot patchset is shipped by basically every single > > mainstream Linux distribution (and a whole bunch that are niche). Right > > now they're having to do extra work to rebase it and ensure that fixes > > get distributed to everyone. There's clearly demand, and Linus has been > > clear that features that are shipped by everyone should just go into > > mainline, so if there are *technical* objections then let's figure them > > out and otherwise just get this stuff merged. > > "this stuff" is brand new things, that no one is shipping. And nothing > "just goes" into mainline, no matter what foolish stuff distros end up > shipping (an example, do you want the giant Xen kernel patchset that > SuSE has been dragging around for 10+ years?) This is a logical extension to the base patchset, and one maintainer has NAKed the base patchset due to it lacking this feature. If you don't care about this then just tell Alan that you want the base patchset merged anyway and we'll go from there. Let's not get into a situation where people are being given incompatible requirements before something's merged. -- Matthew Garrett | mjg59@srcf.ucam.org
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/39] Annotate hw config module params for future lockdown David Howells <dhowells@redhat.com> - 2016-12-01 13:30 +0100
[PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) David Howells <dhowells@redhat.com> - 2016-12-01 13:30 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) Greg KH <gregkh@linuxfoundation.org> - 2016-12-01 16:10 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) David Howells <dhowells@redhat.com> - 2016-12-01 17:10 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-12-05 22:20 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) Greg KH <gregkh@linuxfoundation.org> - 2016-12-06 08:20 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) David Howells <dhowells@redhat.com> - 2016-12-06 11:50 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) Greg KH <gregkh@linuxfoundation.org> - 2016-12-06 12:00 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) Matthew Garrett <mjg59@srcf.ucam.org> - 2016-12-02 04:50 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) Greg KH <gregkh@linuxfoundation.org> - 2016-12-02 08:00 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) Matthew Garrett <mjg59@srcf.ucam.org> - 2016-12-02 08:20 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-12-05 22:30 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) David Howells <dhowells@redhat.com> - 2016-12-02 16:00 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) Greg KH <gregkh@linuxfoundation.org> - 2016-12-05 16:50 +0100
Re: [PATCH 01/39] Annotate module params that specify hardware parameters (eg. ioport) David Howells <dhowells@redhat.com> - 2016-12-06 12:00 +0100
[PATCH 20/39] Annotate hardware config module parameters in drivers/net/hamradio/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 34/39] Annotate hardware config module parameters in drivers/watchdog/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 34/39] Annotate hardware config module parameters in drivers/watchdog/ Guenter Roeck <linux@roeck-us.net> - 2016-12-01 14:00 +0100
[PATCH 03/39] Annotate hardware config module parameters in drivers/char/ipmi/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 03/39] Annotate hardware config module parameters in drivers/char/ipmi/ Corey Minyard <minyard@acm.org> - 2016-12-01 14:20 +0100
[PATCH 05/39] Annotate hardware config module parameters in drivers/char/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 28/39] Annotate hardware config module parameters in drivers/staging/i4l/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 07/39] Annotate hardware config module parameters in drivers/cpufreq/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 07/39] Annotate hardware config module parameters in drivers/cpufreq/ "Rafael J. Wysocki" <rafael@kernel.org> - 2016-12-01 15:10 +0100
Re: [PATCH 07/39] Annotate hardware config module parameters in drivers/cpufreq/ David Howells <dhowells@redhat.com> - 2016-12-01 15:20 +0100
Re: [PATCH 07/39] Annotate hardware config module parameters in drivers/cpufreq/ "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-12-01 15:30 +0100
[PATCH 39/39] Annotate hardware config module parameters in sound/pci/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 35/39] Annotate hardware config module parameters in fs/pstore/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 11/39] Annotate hardware config module parameters in drivers/input/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 11/39] Annotate hardware config module parameters in drivers/input/ Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-12-03 20:00 +0100
[PATCH 21/39] Annotate hardware config module parameters in drivers/net/irda/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 31/39] Annotate hardware config module parameters in drivers/staging/vme/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 33/39] Annotate hardware config module parameters in drivers/video/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 04/39] Annotate hardware config module parameters in drivers/char/mwave/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 38/39] Annotate hardware config module parameters in sound/oss/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 06/39] Annotate hardware config module parameters in drivers/clocksource/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 12/39] Annotate hardware config module parameters in drivers/isdn/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 23/39] Annotate hardware config module parameters in drivers/net/wireless/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 23/39] Annotate hardware config module parameters in drivers/net/wireless/ Kalle Valo <kvalo@codeaurora.org> - 2016-12-02 06:10 +0100
Re: [PATCH 23/39] Annotate hardware config module parameters in drivers/net/wireless/ David Howells <dhowells@redhat.com> - 2016-12-07 14:50 +0100
[PATCH 29/39] Annotate hardware config module parameters in drivers/staging/media/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 29/39] Annotate hardware config module parameters in drivers/staging/media/ Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2016-12-01 16:00 +0100
Re: [PATCH 29/39] Annotate hardware config module parameters in drivers/staging/media/ David Howells <dhowells@redhat.com> - 2016-12-01 16:10 +0100
Re: [PATCH 29/39] Annotate hardware config module parameters in drivers/staging/media/ Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2016-12-01 16:20 +0100
[PATCH 09/39] Annotate hardware config module parameters in drivers/i2c/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 09/39] Annotate hardware config module parameters in drivers/i2c/ Jean Delvare <jdelvare@suse.de> - 2016-12-01 14:50 +0100
Re: [PATCH 09/39] Annotate hardware config module parameters in drivers/i2c/ David Howells <dhowells@redhat.com> - 2016-12-01 15:20 +0100
Re: [PATCH 09/39] Annotate hardware config module parameters in drivers/i2c/ Jean Delvare <jdelvare@suse.de> - 2016-12-01 17:10 +0100
Re: [PATCH 09/39] Annotate hardware config module parameters in drivers/i2c/ One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-12-05 22:20 +0100
[PATCH 19/39] Annotate hardware config module parameters in drivers/net/ethernet/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 18/39] Annotate hardware config module parameters in drivers/net/can/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 18/39] Annotate hardware config module parameters in drivers/net/can/ Marc Kleine-Budde <mkl@pengutronix.de> - 2016-12-01 14:10 +0100
[PATCH 25/39] Annotate hardware config module parameters in drivers/pci/hotplug/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 25/39] Annotate hardware config module parameters in drivers/pci/hotplug/ Bjorn Helgaas <helgaas@kernel.org> - 2016-12-07 19:40 +0100
[PATCH 27/39] Annotate hardware config module parameters in drivers/scsi/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 27/39] Annotate hardware config module parameters in drivers/scsi/ Finn Thain <fthain@telegraphics.com.au> - 2016-12-01 23:10 +0100
[PATCH 26/39] Annotate hardware config module parameters in drivers/pcmcia/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 08/39] Annotate hardware config module parameters in drivers/gpio/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 08/39] Annotate hardware config module parameters in drivers/gpio/ William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-12-01 14:50 +0100
Re: [PATCH 08/39] Annotate hardware config module parameters in drivers/gpio/ Linus Walleij <linus.walleij@linaro.org> - 2016-12-02 14:00 +0100
[PATCH 32/39] Annotate hardware config module parameters in drivers/tty/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 32/39] Annotate hardware config module parameters in drivers/tty/ Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-12-01 16:10 +0100
[PATCH 13/39] Annotate hardware config module parameters in drivers/media/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 36/39] Annotate hardware config module parameters in sound/drivers/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 17/39] Annotate hardware config module parameters in drivers/net/arcnet/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 24/39] Annotate hardware config module parameters in drivers/parport/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 15/39] Annotate hardware config module parameters in drivers/mmc/host/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 02/39] Annotate hardware config module parameters in arch/x86/mm/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 16/39] Annotate hardware config module parameters in drivers/net/appletalk/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 37/39] Annotate hardware config module parameters in sound/isa/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 30/39] Annotate hardware config module parameters in drivers/staging/speakup/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 22/39] Annotate hardware config module parameters in drivers/net/wan/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
[PATCH 10/39] Annotate hardware config module parameters in drivers/iio/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
Re: [PATCH 10/39] Annotate hardware config module parameters in drivers/iio/ William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-12-01 15:00 +0100
Re: [PATCH 10/39] Annotate hardware config module parameters in drivers/iio/ Jonathan Cameron <jic23@kernel.org> - 2016-12-03 15:40 +0100
Re: [PATCH 10/39] Annotate hardware config module parameters in drivers/iio/ David Howells <dhowells@redhat.com> - 2016-12-07 14:50 +0100
[PATCH 14/39] Annotate hardware config module parameters in drivers/misc/ David Howells <dhowells@redhat.com> - 2016-12-01 13:40 +0100
csiph-web