|
|
Subscribe / Log in / New account

Re: [PATCH] x86: Lock down MSR writing in secure boot

From:  Kees Cook <keescook-AT-chromium.org>
To:  "H. Peter Anvin" <hpa-AT-zytor.com>
Subject:  Re: [PATCH] x86: Lock down MSR writing in secure boot
Date:  Fri, 8 Feb 2013 12:14:02 -0800
Message-ID:  <CAGXu5j+_mGzR+72YqORhErMUY1aF1H2urczZ8SwuJHZK-oZL6g@mail.gmail.com>
Cc:  LKML <linux-kernel-AT-vger.kernel.org>, Matthew Garrett <matthew.garrett-AT-nebula.com>, Thomas Gleixner <tglx-AT-linutronix.de>, Ingo Molnar <mingo-AT-redhat.com>, "x86-AT-kernel.org" <x86-AT-kernel.org>, "linux-efi-AT-vger.kernel.org" <linux-efi-AT-vger.kernel.org>, linux-security-module <linux-security-module-AT-vger.kernel.org>
Archive‑link:  Article

On Fri, Feb 8, 2013 at 11:42 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> On 02/08/2013 11:18 AM, Kees Cook wrote:
>>
>> No. CAP_RAWIO is for reading. Writing needs a much stronger check.
>
> If so, I suspect we need to do this for *all* raw I/O... but I keep
> wondering how much more sensitive writing really is than reading.

Well, I think there's a reasonable distinction between systems that
expect to strictly enforce user-space/kernel-space separation
(CAP_COMPROMISE_KERNEL) and things that are fiddling with hardware
(CAP_SYS_RAWIO).

For example, even things like /dev/mem already have this separation
(although it is stronger). You can't open /dev/mem without
CAP_SYS_RAWIO, but if you do, you still can't write to RAM in
/dev/mem. This might be one of the earliest examples of this
distinction, actually.

I think it's likely that after a while, we can convert some of these
proposed CAP_COMPROMISE_KERNEL checks in always-deny once we figure
out how to deal with those areas more safely.

-Kees

--
Kees Cook
Chrome OS Security



to post comments


Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds