lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Nov 2017 14:38:54 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Borislav Petkov <bp@...en8.de>,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v5 11/11] intel_sgx: driver documentation

On Tue, Nov 21, 2017 at 12:46:23AM +0200, Jarkko Sakkinen wrote:
> On Wed, Nov 15, 2017 at 12:54:12PM +0100, Peter Zijlstra wrote:
> > On Tue, Nov 14, 2017 at 10:49:48PM +0200, Jarkko Sakkinen wrote:
> > > In these cases IA32_FEATURE_CONTROL[17] would be zeroed before locking
> > > the feature control, which would mean that the kernel could not write
> > > new values with wrmsr for the root key hash.
> > 
> > > The question is whether we want to allow this or not. If the answer is
> > > no, a check can be added to the driver initialization code whether 17 is
> > > set, and if not, it driver would fail to initialize.
> > 
> > That has my vote; I would not trust a firmware/BIOS key.
> 
> Please note that it does not have a key to look inside the enclave. The
> enclave is protected by two means:
> 
> 1. The CPU asserts the memory accesses to it.
> 2. The CPU encrypts/decrypts in L1 in order to protect from physical
>    attacks and peripherals that have potential spy the bus.

The encryption key is generated for every boot cycle and it is *never*
leaked out of the CPU package.

After thinking what you and Borislav said I position myself to the point
of view that even if the MSRs would be read-only the kernel could allow
running enclaves *with a condition*.

I propose adding an additional check to the driver initialization:

  Try to start LE. If it doesn't start i.e. is signed with a different
  root key than the one inside MSRs, then fail the initialization.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ