public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <matthew.garrett@nebula.com>
To: David Lang <david@lang.hm>
Cc: "Valdis.Kletnieks@vt.edu" <Valdis.Kletnieks@vt.edu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	"jmorris@namei.org" <jmorris@namei.org>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>
Subject: Re: [PATCH 00/12] One more attempt at useful kernel lockdown
Date: Tue, 10 Sep 2013 00:53:14 +0000	[thread overview]
Message-ID: <1378774394.17982.36.camel@x230.lan> (raw)
In-Reply-To: <alpine.DEB.2.02.1309091614010.2479@nftneq.ynat.uz>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2790 bytes --]

On Mon, 2013-09-09 at 16:19 -0700, David Lang wrote:
> On Mon, 9 Sep 2013, Matthew Garrett wrote:
> > Having thought about this, the answer is no. It presents exactly the
> > same problem as capabilities do - the set can never be meaningfully
> > extended. If an application sets only the bits it knows about, and if a
> > new security-sensitive feature is added to the kernel, the feature will
> > be left enabled and the system will be insecure. Alternatively, if an
> > application sets all the bits regardless of whether it knows them or
> > not, it may enable a lockdown feature that it otherwise required.
> 
> In this case you are no less secure than you were before the feature was added, 
> you just can't take advantage of the new feature without updating userspace.

No. Say someone adds an additional lockdown bit to forbid raw access to
mounted block devices. The "Turn everything off" approach now means that
I won't be able to perform raw access to mounted block devices, even if
that's something that my use case relies on.

> > The only way this is useful is if all the bits are semantically
> > equivalent, and in that case there's no point in having anything other
> > than a single bit. Users who want a more fine-grained interface should
> > use one of the existing mechanisms for doing so - leave the kernel open
> > and impose the security policy from userspace using either capabilities
> > or selinux.
> 
> so if you only have a single bit, how do you deal with the case where that bit 
> locks down something that's required? (your reason for not just setting all bits 
> in the first approach)

Because that bit is well-defined, and if anything is added to it that
doesn't match that definition then it's a bug.

> your arguments don't seem self consistent.

You don't seem to have been paying attention to the past 12 months of
discussion.

> If I'm building a kiosk PC (or voting machine), I want to disable a lot of 
> things that I could not get away with disabling on a generic laptop. Are we 
> going to have Securelevel, ReallySecurelevel, ReallyReallySecurelevel, etc? or 
> can we accept that security is not binary and allow users to disable features 
> in a more granualar way?

Anything more granular means that you trust your userspace, and if you
trust your userspace then you can already set up a granular policy using
the existing tools for that job. So just use the existing tools.

> And if SELinux can do the job, what is the reason for creating this new option?

Because you can't embed an unmodifiable selinux policy in the kernel.

-- 
Matthew Garrett <matthew.garrett@nebula.com>
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  parent reply	other threads:[~2013-09-10  0:53 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 15:49 [PATCH 00/12] One more attempt at useful kernel lockdown Matthew Garrett
2013-09-09 15:49 ` [PATCH 01/12] Add BSD-style securelevel support Matthew Garrett
2013-09-09 16:27   ` H. Peter Anvin
2013-09-09 16:30     ` Matthew Garrett
2013-09-09 16:42       ` H. Peter Anvin
2013-09-09 16:44         ` Matthew Garrett
2013-09-09 16:51           ` H. Peter Anvin
2013-09-09 16:55             ` Matthew Garrett
2013-09-09 18:31     ` Matthew Garrett
2013-09-09 15:49 ` [PATCH 02/12] Enforce module signatures when securelevel is greater than 0 Matthew Garrett
2013-09-09 15:49 ` [PATCH 03/12] PCI: Lock down BAR access when securelevel is enabled Matthew Garrett
2013-09-09 15:49 ` [PATCH 04/12] x86: Lock down IO port " Matthew Garrett
2013-09-09 15:49 ` [PATCH 05/12] Restrict /dev/mem and /dev/kmem when securelevel is set Matthew Garrett
2013-09-09 15:49 ` [PATCH 06/12] acpi: Limit access to custom_method if " Matthew Garrett
2013-09-09 15:49 ` [PATCH 07/12] acpi: Ignore acpi_rsdp kernel parameter when " Matthew Garrett
2013-11-26 12:54   ` Josh Boyer
2013-09-09 15:49 ` [PATCH 08/12] kexec: Disable at runtime if securelevel has been set Matthew Garrett
2013-09-09 15:49 ` [PATCH 09/12] uswsusp: Disable when securelevel is set Matthew Garrett
2013-09-09 15:49 ` [PATCH 10/12] x86: Restrict MSR access " Matthew Garrett
2013-09-09 15:49 ` [PATCH 11/12] asus-wmi: Restrict debugfs interface " Matthew Garrett
2013-09-09 15:49 ` [PATCH 12/12] Add option to automatically set securelevel when in Secure Boot mode Matthew Garrett
2013-09-09 17:18 ` [PATCH 00/12] One more attempt at useful kernel lockdown Valdis.Kletnieks
2013-09-09 17:24   ` Matthew Garrett
2013-09-09 18:25   ` David Lang
2013-09-09 18:28     ` Matthew Garrett
2013-09-09 18:40       ` David Lang
2013-09-09 18:42         ` Matthew Garrett
2013-09-09 18:53           ` David Lang
2013-09-09 19:06             ` Matthew Garrett
2013-09-09 19:59               ` David Lang
2013-09-09 20:06                 ` Matthew Garrett
2013-09-09 20:15                   ` David Lang
2013-09-09 20:17                     ` Matthew Garrett
2013-09-09 19:01     ` Valdis.Kletnieks
2013-09-09 19:08       ` Matthew Garrett
2013-09-09 19:41       ` H. Peter Anvin
2013-09-09 19:52         ` Josh Boyer
2013-09-09 19:56           ` H. Peter Anvin
2013-09-09 19:58             ` Josh Boyer
2013-09-09 20:02               ` H. Peter Anvin
2013-09-09 20:10           ` David Lang
2013-09-09 20:13             ` Josh Boyer
2013-09-09 23:02     ` Matthew Garrett
2013-09-09 23:19       ` David Lang
2013-09-09 23:20         ` Kees Cook
2013-09-09 23:30           ` James Bottomley
2013-09-09 23:34             ` Kees Cook
2013-09-10  0:53         ` Matthew Garrett [this message]
2013-09-10  2:44           ` David Lang
2013-09-10  2:55             ` Matthew Garrett
2013-09-10  3:09               ` David Lang
2013-09-10  3:53                 ` Matthew Garrett
2013-09-10 17:23                   ` Henrique de Moraes Holschuh
2013-09-10 18:26                     ` Matthew Garrett
2013-09-10 18:29                       ` H. Peter Anvin
2013-09-10 18:51                         ` gregkh
2013-09-10 18:55                           ` Kees Cook
2013-09-10 19:17                             ` David Lang
2013-09-10 19:44                               ` H. Peter Anvin
2013-09-10 23:43                                 ` Mimi Zohar
2013-09-10 23:48                                   ` H. Peter Anvin
2013-09-10 23:55                                     ` Mimi Zohar
2013-09-10 23:58                                       ` H. Peter Anvin
2013-09-10 18:48                       ` Kees Cook
2013-09-11  9:32                       ` joeyli
2013-09-09 20:30 ` Mimi Zohar

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=1378774394.17982.36.camel@x230.lan \
    --to=matthew.garrett@nebula.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=david@lang.hm \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jmorris@namei.org \
    --cc=keescook@chromium.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.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