All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Matthew Garrett
	<matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org>
Cc: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
	Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-security-module
	<linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] x86: Lock down MSR writing in secure boot
Date: Wed, 13 Feb 2013 09:20:46 -0800	[thread overview]
Message-ID: <511BCB6E.8080102@zytor.com> (raw)
In-Reply-To: <1360737709.18083.36.camel-+5W/JHIUVxg@public.gmane.org>

On 02/12/2013 10:41 PM, Matthew Garrett wrote:
> On Tue, 2013-02-12 at 22:33 -0800, H. Peter Anvin wrote:
>
>> That is just batshit crazy.  If you have CAP_SYS_RAWIO you can do iopl()
>> which means you can reprogram your northbridge, at which point you most
>> definitely *can* modify the running kernel.
>
> Well right, that's the point of this patchset - it adds some extra
> permission checks to some of the existing CAP_SYS_RAWIO checks.
> CAP_SYS_RAWIO hasn't meant "I can perform arbitrary pio and mmio" for
> years - it means "I can do things that might maybe break something
> somehow". So sure, removing CAP_SYS_RAWIO would give us basically all
> the security we want in a secure boot environment, but it would also
> block things that we *want* to work.
>

So, let 's see...

Problem:

Someone adds SYS_CAP_RAWIO to some places it definitely does not
belong.

Solution:

Break all the *appropriate* (as defined)uses of SYS_CAP_RAWIO?

What the heck?

	-hpa



-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Matthew Garrett <matthew.garrett@nebula.com>
Cc: Borislav Petkov <bp@alien8.de>, Kees Cook <keescook@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "x86@kernel.org" <x86@kernel.org>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	linux-security-module <linux-security-module@vger.kernel.org>
Subject: Re: [PATCH] x86: Lock down MSR writing in secure boot
Date: Wed, 13 Feb 2013 09:20:46 -0800	[thread overview]
Message-ID: <511BCB6E.8080102@zytor.com> (raw)
In-Reply-To: <1360737709.18083.36.camel@x230.lan>

On 02/12/2013 10:41 PM, Matthew Garrett wrote:
> On Tue, 2013-02-12 at 22:33 -0800, H. Peter Anvin wrote:
>
>> That is just batshit crazy.  If you have CAP_SYS_RAWIO you can do iopl()
>> which means you can reprogram your northbridge, at which point you most
>> definitely *can* modify the running kernel.
>
> Well right, that's the point of this patchset - it adds some extra
> permission checks to some of the existing CAP_SYS_RAWIO checks.
> CAP_SYS_RAWIO hasn't meant "I can perform arbitrary pio and mmio" for
> years - it means "I can do things that might maybe break something
> somehow". So sure, removing CAP_SYS_RAWIO would give us basically all
> the security we want in a secure boot environment, but it would also
> block things that we *want* to work.
>

So, let 's see...

Problem:

Someone adds SYS_CAP_RAWIO to some places it definitely does not
belong.

Solution:

Break all the *appropriate* (as defined)uses of SYS_CAP_RAWIO?

What the heck?

	-hpa



-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  parent reply	other threads:[~2013-02-13 17:20 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 19:12 [PATCH] x86: Lock down MSR writing in secure boot Kees Cook
2013-02-08 19:17 ` H. Peter Anvin
     [not found]   ` <00780235-deac-4f80-b936-867834e05661-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2013-02-08 19:18     ` Kees Cook
2013-02-08 19:18       ` Kees Cook
2013-02-08 19:42       ` H. Peter Anvin
2013-02-08 20:14         ` Kees Cook
     [not found]           ` <CAGXu5j+_mGzR+72YqORhErMUY1aF1H2urczZ8SwuJHZK-oZL6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-08 20:18             ` H. Peter Anvin
2013-02-08 20:18               ` H. Peter Anvin
2013-02-08 20:28               ` Kees Cook
     [not found]                 ` <CAGXu5jLAufTRm=sDST0br_WEkn4o0Hpjv2jDP2Na=cCvuM+MGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-08 20:34                   ` Matthew Garrett
2013-02-08 20:34                     ` Matthew Garrett
2013-02-08 21:02                     ` Kees Cook
2013-02-08 21:02                       ` Kees Cook
     [not found]                       ` <CAGXu5jKo2PfMBO4A0ZgQcrPuj8OHNaff+CjAesOAWkZc0vB9+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-08 21:07                         ` Matthew Garrett
2013-02-08 21:07                           ` Matthew Garrett
     [not found]                           ` <1360357636.18083.19.camel-+5W/JHIUVxg@public.gmane.org>
2013-02-08 21:14                             ` Josh Boyer
2013-02-08 21:14                               ` Josh Boyer
2013-02-08 23:09                               ` Andy Lutomirski
2013-02-08 22:30                         ` H. Peter Anvin
2013-02-08 22:30                           ` H. Peter Anvin
2013-02-08 23:06                           ` Borislav Petkov
2013-02-08 23:26                             ` Matthew Garrett
2013-02-08 23:26                               ` Matthew Garrett
     [not found]                               ` <1360366012.18083.21.camel-+5W/JHIUVxg@public.gmane.org>
2013-02-09  1:22                                 ` H. Peter Anvin
2013-02-09  1:22                                   ` H. Peter Anvin
2013-02-09  1:29                                   ` Matthew Garrett
2013-02-09  1:29                                     ` Matthew Garrett
     [not found]                                     ` <1360373383.18083.23.camel-+5W/JHIUVxg@public.gmane.org>
2013-02-09  6:45                                       ` Kees Cook
2013-02-09  6:45                                         ` Kees Cook
     [not found]                                         ` <CAGXu5j+xvJ3L5ejxtZ-Jw3F6rV7OsrE0_HZCGu_er0rH2_PwKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-09  9:29                                           ` Borislav Petkov
2013-02-09  9:29                                             ` Borislav Petkov
2013-02-09 15:10                                             ` Kees Cook
     [not found]                                             ` <20130209092925.GA17728-fF5Pk5pvG8Y@public.gmane.org>
2013-02-09 15:11                                               ` Matthew Garrett
2013-02-09 15:11                                                 ` Matthew Garrett
2013-02-13  0:48                                                 ` H. Peter Anvin
2013-02-13  5:39                                                   ` Matthew Garrett
2013-02-13  5:39                                                     ` Matthew Garrett
     [not found]                                                     ` <1360733962.18083.30.camel-+5W/JHIUVxg@public.gmane.org>
2013-02-13  6:12                                                       ` H. Peter Anvin
2013-02-13  6:12                                                         ` H. Peter Anvin
2013-02-13  6:27                                                         ` Matthew Garrett
2013-02-13  6:27                                                           ` Matthew Garrett
2013-02-13  6:33                                                           ` H. Peter Anvin
     [not found]                                                             ` <511B33BC.9080307-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-02-13  6:41                                                               ` Matthew Garrett
2013-02-13  6:41                                                                 ` Matthew Garrett
     [not found]                                                                 ` <1360737709.18083.36.camel-+5W/JHIUVxg@public.gmane.org>
2013-02-13 17:20                                                                   ` H. Peter Anvin [this message]
2013-02-13 17:20                                                                     ` H. Peter Anvin
2013-02-13 17:26                                                                     ` Matthew Garrett
2013-02-13 17:26                                                                       ` Matthew Garrett
2013-02-13 17:51                                                                       ` Casey Schaufler
2013-02-13 17:51                                                                         ` Casey Schaufler
     [not found]                                                                         ` <511BD291.1040003-iSGtlc1asvQWG2LlvL+J4A@public.gmane.org>
2013-02-13 17:56                                                                           ` Matthew Garrett
2013-02-13 17:56                                                                             ` Matthew Garrett
2013-02-13 18:44                                                                             ` H. Peter Anvin
2013-02-13 18:44                                                                               ` H. Peter Anvin
2013-02-13 18:51                                                                               ` Matthew Garrett
2013-02-13 18:51                                                                                 ` Matthew Garrett
2013-02-13 22:26                                                                         ` H. Peter Anvin
2013-02-13 22:26                                                                           ` H. Peter Anvin
2013-02-13 22:58                                                                           ` Casey Schaufler
2013-02-13 22:58                                                                             ` Casey Schaufler
     [not found]                                                                             ` <511C1A94.8020804-iSGtlc1asvQWG2LlvL+J4A@public.gmane.org>
2013-02-14  0:25                                                                               ` H. Peter Anvin
2013-02-14  0:25                                                                                 ` H. Peter Anvin
2013-02-14  0:44                                                                                 ` Casey Schaufler
2013-02-14  0:44                                                                                   ` Casey Schaufler
     [not found]                                                                                   ` <511C3389.5090604-iSGtlc1asvQWG2LlvL+J4A@public.gmane.org>
2013-02-14  1:04                                                                                     ` Matthew Garrett
2013-02-14  1:04                                                                                       ` Matthew Garrett
     [not found]                                                                                       ` <1360803872.18083.46.camel-+5W/JHIUVxg@public.gmane.org>
2013-02-14  1:08                                                                                         ` H. Peter Anvin
2013-02-14  1:08                                                                                           ` H. Peter Anvin
     [not found]                                                                                           ` <511C3927.90603-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-02-14  2:46                                                                                             ` Matthew Garrett
2013-02-14  2:46                                                                                               ` Matthew Garrett
2013-02-14  1:34                                                                                       ` Casey Schaufler
2013-02-14  1:34                                                                                         ` Casey Schaufler
2013-02-13  8:27                                                             ` Paolo Bonzini
2013-02-13 17:21                                                               ` H. Peter Anvin
     [not found]                                                               ` <511B4E61.1040604-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-13 17:22                                                                 ` H. Peter Anvin
2013-02-13 17:22                                                                   ` H. Peter Anvin
2013-02-13 19:55                                                                   ` Paolo Bonzini
     [not found]                                                                   ` <511B EFAD.1050206@redhat.com>
     [not found]                                                                     ` <511BEFAD.1050206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-13 22:24                                                                       ` H. Peter Anvin
2013-02-13 22:24                                                                         ` H. Peter Anvin
2013-02-08 19:17 ` Matthew Garrett
2013-02-08 19:17   ` Matthew Garrett
2013-02-08 19:21   ` Kees Cook
     [not found]     ` <CAGXu5j+aXxQb_Jyn6G+JUdjNOF2EGo9pTw8dBYuZUTb+S1vWow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-08 19:27       ` Matthew Garrett
2013-02-08 19:27         ` Matthew Garrett

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=511BCB6E.8080102@zytor.com \
    --to=hpa-ymnouzjc4hwavxtiumwx3w@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 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.