All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: "Artem S. Tashkinov" <ultrafine@gmx.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: On the issue of CPU model-specific registers write protection in UEFI secure boot mode
Date: Thu, 7 Feb 2019 08:24:12 -0800	[thread overview]
Message-ID: <20190207162411.GA1144@linux.intel.com> (raw)
In-Reply-To: <8d1f8adc-222b-40df-4573-67f28819126c@gmx.com>

On Thu, Feb 07, 2019 at 01:37:16AM +0000, Artem S. Tashkinov wrote:
> Hello LKML,
> 
> Is there a serious reason why CPU MSR is write protected in UEFI secure boot
> mode in Linux?
>  * In order to even use MSR you have to be root to `modprobe msr`.
>  * In order to read/write from/to MSR you have to be root as /dev/cpu/*/msr
> is accessible only by root.
>  * CPU registers don't survive reboot/power cycles.
>  * I'm not a CPU designer but if I'm not mistaken MSR cannot be used to
> create any sort of stealth malware.

Rewriting SYSENTER MSRs allows arbitrary ring0 code execution.  That's
the most obvious example, there are undoubtedly other attacks that can
be concocted by modifying MSRs.

https://lkml.kernel.org/r/20130208191213.GA25081@www.outflux.net
https://lkml.kernel.org/r/149141201983.30815.1240162780237131881.stgit@warthog.procyon.org.uk

> So, I'm asking this question because these registers allow to fine tune
> Intel CPU power parameters ( https://github.com/georgewhewell/undervolt )
> like voltage and others and make it possible to run your system both faster
> and cooler and right now it's not possible under Linux and perfectly
> possible under competing proprietary OSes.
> 
> Of course, the user can
> 
>  * fetch his distro kernel sources
>  * apply a patch from (
> https://github.com/intel/intel-cmt-cat/wiki/UEFI-Secure-Boot-Compatibility )
>  * install his own UEFI certificate
>  * compile, sign and install a patched MSR kernel module
> 
> However this all has to be done for each new kernel release and many Linux
> users just cannot do anything on this list.
> 
> Best regards,
> Artem

      reply	other threads:[~2019-02-07 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  1:37 On the issue of CPU model-specific registers write protection in UEFI secure boot mode Artem S. Tashkinov
2019-02-07 16:24 ` Sean Christopherson [this message]

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=20190207162411.GA1144@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ultrafine@gmx.com \
    /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.