All of lore.kernel.org
 help / color / mirror / Atom feed
* Trusted kernel patchset for Secure Boot lockdown
@ 2014-02-26 20:11 Matthew Garrett
  2014-02-26 20:11 ` [PATCH 01/12] Add support for indicating that the booted kernel is externally trusted Matthew Garrett
                   ` (13 more replies)
  0 siblings, 14 replies; 129+ messages in thread
From: Matthew Garrett @ 2014-02-26 20:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: keescook, gregkh, hpa, linux-efi, jmorris, linux-security-module

The conclusion we came to at Plumbers was that this patchset was basically
fine but that Linus hated the name "securelevel" more than I hate pickled
herring, so after thinking about this for a few months I've come up with
"Trusted Kernel". This flag indicates that the kernel is, via some
external mechanism, trusted and should behave that way. If firmware has
some way to verify the kernel, it can pass that information on. If userspace
has some way to verify the kernel, it can set the flag itself. However,
userspace should not attempt to use the flag as a means to verify that the
kernel was trusted - untrusted userspace could have set it on an untrusted
kernel, but by the same metric an untrusted kernel could just set it itself.

If people object to this name then I swear to god that I will open a poll
on Phoronix to decide the next attempt and you will like that even less.


^ permalink raw reply	[flat|nested] 129+ messages in thread
* Trusted kernel patchset
@ 2015-03-13 21:38 Matthew Garrett
  2015-03-13 21:38 ` [PATCH 01/12] Add support for indicating that the booted kernel is externally trusted Matthew Garrett
  0 siblings, 1 reply; 129+ messages in thread
From: Matthew Garrett @ 2015-03-13 21:38 UTC (permalink / raw)
  To: linux-security-module
  Cc: james.l.morris, serge, linux-kernel, keescook, hpa, gnomes

This is a slightly cleaned up version of the patchset posted last year
(https://lkml.org/lkml/2014/2/26/554). I've made a couple of minor changes
based on feedback, but otherwise this is pretty much the same. Some things
I *haven't* done:

1) Disabled CAP_SYS_RAWIO

Disabling CAP_SYS_RAWIO has the fun side effect of disabling things like
CPU microcode loading. Given that the microcode is already signed and the
CPU validates that, this isn't helpful. There's just too many cases where
CAP_SYS_RAWIO is required for features that are outside the scope of ensuring
that the kernel can't be tampered with. In addition, there are features that
don't require CAP_SYS_RAWIO which should be blocked.

2) Disabled CAP_SYS_RAWIO but whitelisted specific CAP_SYS_RAWIO features

This was Alan's suggestion - change capable() to check whether the capability
requested was blacklisted, and then add a capable_always() that ignored the
blacklist. In this scenario, /dev/mem would still use capable(CAP_SYS_RAWIO)
and would be denied, but the microcode loader would use
capable_always(CAP_SYS_RAWIO) and would be permitted. This changes certain
behavioural expectations (eg, having CAP_SYS_RAWIO would no longer be
sufficient to pass capable(CAP_SYS_RAWIO)) and would still hit the problem
of features that should be blocked but don't currently require CAP_SYS_RAWIO.
I think this is fundamentally more confusing than the approach I've
implemented.

3) Done one of the above and added new CAP_SYS_RAWIO checks

This would handle the case of features that should be blocked but which don't
currently require CAP_SYS_RAWIO, but would break any userspace that has
dropped privileges and expects to be able to use these features even in the
case that this feature isn't enabled. I don't think it's beneficial.

4) Used the word "measured"

Nothing is being measured.

A patchset basically equivalent to this is already used by most major Linux
distributions, so it would be nice to either get this merged or have feedback
from a relevant maintainer as to how they'd like it to be implemented instead.

-- 
Matthew Garrett | <matthew.garrett@nebula.com> 


^ permalink raw reply	[flat|nested] 129+ messages in thread

end of thread, other threads:[~2015-03-13 21:39 UTC | newest]

Thread overview: 129+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-26 20:11 Trusted kernel patchset for Secure Boot lockdown Matthew Garrett
2014-02-26 20:11 ` [PATCH 01/12] Add support for indicating that the booted kernel is externally trusted Matthew Garrett
2014-02-27 19:02   ` Kees Cook
2014-02-27 19:02     ` Kees Cook
2014-03-31 14:49   ` Pavel Machek
2014-02-26 20:11 ` [PATCH 02/12] Enforce module signatures when trusted kernel is enabled Matthew Garrett
2014-02-26 20:11   ` Matthew Garrett
2014-02-26 20:11 ` [PATCH 03/12] PCI: Lock down BAR access when trusted_kernel is true Matthew Garrett
2014-02-26 20:11 ` [PATCH 04/12] x86: Lock down IO port " Matthew Garrett
2014-02-26 20:11 ` [PATCH 05/12] Restrict /dev/mem and /dev/kmem " Matthew Garrett
2014-02-26 20:11 ` [PATCH 06/12] acpi: Limit access to custom_method if " Matthew Garrett
2014-02-26 20:11 ` [PATCH 07/12] acpi: Ignore acpi_rsdp kernel parameter when " Matthew Garrett
2014-02-26 20:11 ` [PATCH 08/12] kexec: Disable at runtime if " Matthew Garrett
2014-02-26 20:11 ` [PATCH 09/12] uswsusp: Disable when " Matthew Garrett
2014-02-26 20:11   ` Matthew Garrett
2014-03-31 14:49   ` Pavel Machek
2014-02-26 20:11 ` [PATCH 10/12] x86: Restrict MSR access " Matthew Garrett
2014-02-26 20:11 ` [PATCH 11/12] asus-wmi: Restrict debugfs interface " Matthew Garrett
2014-02-26 20:11 ` [PATCH 12/12] Add option to automatically set trusted_kernel when in Secure Boot mode Matthew Garrett
2014-02-26 20:11   ` Matthew Garrett
2014-02-26 22:41   ` One Thousand Gnomes
2014-02-26 22:41     ` One Thousand Gnomes
2014-02-26 22:47     ` H. Peter Anvin
2014-02-26 22:48     ` Matthew Garrett
2014-02-26 22:48       ` Matthew Garrett
2014-02-27 18:48       ` Kees Cook
2014-02-27 18:48         ` Kees Cook
2014-02-26 21:11 ` Trusted kernel patchset for Secure Boot lockdown Kees Cook
2014-02-26 22:21   ` One Thousand Gnomes
2014-02-26 22:21     ` One Thousand Gnomes
2014-02-27  9:54     ` Alon Ziv
2014-03-19 17:42     ` Florian Weimer
2014-03-19 17:42       ` Florian Weimer
2014-02-27 18:04 ` Josh Boyer
2014-02-27 18:04   ` Josh Boyer
2014-02-27 19:07   ` Greg KH
2014-02-27 19:11     ` Josh Boyer
2014-02-27 19:11       ` Josh Boyer
2014-02-28 12:50       ` Josh Boyer
2014-02-28  3:03   ` James Morris
2014-02-28  4:52     ` Matthew Garrett
2014-02-28  4:52       ` Matthew Garrett
2014-03-13  5:01     ` Matthew Garrett
2014-03-13  5:01       ` Matthew Garrett
2014-03-13  6:22       ` Kees Cook
2014-03-13  6:22         ` Kees Cook
2014-03-13  9:33         ` James Morris
2014-03-13  9:33           ` James Morris
2014-03-13 10:12           ` One Thousand Gnomes
2014-03-13 10:12             ` One Thousand Gnomes
2014-03-13 15:54             ` H. Peter Anvin
2014-03-13 15:54               ` H. Peter Anvin
2014-03-13 15:59           ` Matthew Garrett
2014-03-13 15:59             ` Matthew Garrett
2014-03-13 21:24             ` One Thousand Gnomes
2014-03-13 21:24               ` One Thousand Gnomes
2014-03-13 21:28               ` H. Peter Anvin
2014-03-13 21:28                 ` H. Peter Anvin
2014-03-13 21:32                 ` Matthew Garrett
2014-03-13 21:32                   ` Matthew Garrett
2014-03-13 21:30               ` Matthew Garrett
2014-03-13 21:30                 ` Matthew Garrett
2014-03-13 23:21                 ` One Thousand Gnomes
2014-03-13 23:21                   ` One Thousand Gnomes
2014-03-14  1:57                   ` Matthew Garrett
2014-03-14  1:57                     ` Matthew Garrett
2014-03-14 12:22                     ` One Thousand Gnomes
2014-03-14 12:22                       ` One Thousand Gnomes
2014-03-14 12:51                       ` Matthew Garrett
2014-03-14 12:51                         ` Matthew Garrett
2014-03-14 15:23                         ` Kees Cook
2014-03-14 15:23                           ` Kees Cook
2014-03-14 15:46                           ` Matthew Garrett
2014-03-14 15:46                             ` Matthew Garrett
2014-03-14 15:54                             ` Kees Cook
2014-03-14 15:54                               ` Kees Cook
2014-03-14 15:58                               ` Matthew Garrett
2014-03-14 15:58                                 ` Matthew Garrett
2014-03-14 16:28                           ` One Thousand Gnomes
2014-03-14 16:28                             ` One Thousand Gnomes
2014-03-14 17:06                         ` One Thousand Gnomes
2014-03-14 17:06                           ` One Thousand Gnomes
2014-03-14 18:11                           ` Matthew Garrett
2014-03-14 18:11                             ` Matthew Garrett
2014-03-14 19:24                             ` Matthew Garrett
2014-03-14 19:24                               ` Matthew Garrett
2014-03-14 20:37                               ` David Lang
2014-03-14 20:37                                 ` David Lang
2014-03-14 20:43                                 ` Matthew Garrett
2014-03-14 20:43                                   ` Matthew Garrett
2014-03-14 21:58                               ` One Thousand Gnomes
2014-03-14 21:58                                 ` One Thousand Gnomes
2014-03-14 22:04                                 ` Matthew Garrett
2014-03-14 22:04                                   ` Matthew Garrett
2014-03-14 21:48                             ` One Thousand Gnomes
2014-03-14 21:48                               ` One Thousand Gnomes
2014-03-14 21:56                               ` Matthew Garrett
2014-03-14 21:56                                 ` Matthew Garrett
2014-03-14 22:08                                 ` One Thousand Gnomes
2014-03-14 22:08                                   ` One Thousand Gnomes
2014-03-14 22:15                                   ` Matthew Garrett
2014-03-14 22:15                                     ` Matthew Garrett
2014-03-14 22:31                                     ` One Thousand Gnomes
2014-03-14 22:31                                       ` One Thousand Gnomes
2014-03-14 22:52                                       ` Matthew Garrett
2014-03-14 22:52                                         ` Matthew Garrett
2014-03-19 19:50                                       ` Kees Cook
2014-03-19 19:50                                         ` Kees Cook
2014-03-14 23:18                                   ` Theodore Ts'o
2014-03-14 23:18                                     ` Theodore Ts'o
2014-03-15  0:15                                     ` One Thousand Gnomes
2014-03-15  0:15                                       ` One Thousand Gnomes
2014-03-19 17:49                                     ` Florian Weimer
2014-03-19 17:49                                       ` Florian Weimer
2014-03-19 20:16                                     ` Kees Cook
2014-03-19 20:16                                       ` Kees Cook
2014-03-20 14:47                                       ` One Thousand Gnomes
2014-03-20 14:47                                         ` One Thousand Gnomes
2014-03-20 14:55                                       ` tytso
2014-03-20 14:55                                         ` tytso
2014-03-20 17:12                                         ` Matthew Garrett
2014-03-20 17:12                                           ` Matthew Garrett
2014-03-20 18:13                                           ` One Thousand Gnomes
2014-03-20 18:13                                             ` One Thousand Gnomes
2014-03-13 21:26             ` One Thousand Gnomes
2014-03-13 21:26               ` One Thousand Gnomes
2014-03-13 21:31               ` Matthew Garrett
2014-03-13 21:31                 ` Matthew Garrett
2015-03-13 21:38 Trusted kernel patchset Matthew Garrett
2015-03-13 21:38 ` [PATCH 01/12] Add support for indicating that the booted kernel is externally trusted Matthew Garrett

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.