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:   Wed, 21 Apr 2021 10:20:59 -0700
From:   James Bottomley <jejb@...ux.ibm.com>
To:     Sumit Garg <sumit.garg@...aro.org>
Cc:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        Mimi Zohar <zohar@...ux.ibm.com>,
        David Howells <dhowells@...hat.com>,
        Jens Wiklander <jens.wiklander@...aro.org>,
        Jonathan Corbet <corbet@....net>,
        James Morris <jmorris@...ei.org>,
        "Serge E. Hallyn" <serge@...lyn.com>,
        Casey Schaufler <casey@...aufler-ca.com>,
        Janne Karhunen <janne.karhunen@...il.com>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Markus Wamser <Markus.Wamser@...ed-mode.de>,
        Luke Hinds <lhinds@...hat.com>,
        Elaine Palmer <erpalmer@...ibm.com>,
        Ahmad Fatoum <a.fatoum@...gutronix.de>,
        "open list:ASYMMETRIC KEYS" <keyrings@...r.kernel.org>,
        linux-integrity <linux-integrity@...r.kernel.org>,
        "open list:SECURITY SUBSYSTEM" 
        <linux-security-module@...r.kernel.org>,
        Linux Doc Mailing List <linux-doc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        op-tee@...ts.trustedfirmware.org
Subject: Re: [PATCH v9 1/4] KEYS: trusted: Add generic trusted keys framework

On Wed, 2021-04-21 at 16:38 +0530, Sumit Garg wrote:
> Hi James,
> 
> On Wed, 21 Apr 2021 at 04:47, James Bottomley <jejb@...ux.ibm.com>
> wrote:
> > On Mon, 2021-03-01 at 18:41 +0530, Sumit Garg wrote:
> > > Current trusted keys framework is tightly coupled to use TPM
> > > device as an underlying implementation which makes it difficult
> > > for implementations like Trusted Execution Environment (TEE) etc.
> > > to provide trusted keys support in case platform doesn't posses a
> > > TPM device.
> > > 
> > > Add a generic trusted keys framework where underlying
> > > implementations can be easily plugged in. Create struct
> > > trusted_key_ops to achieve this, which contains necessary
> > > functions of a backend.
> > > 
> > > Also, define a module parameter in order to select a particular
> > > trust source in case a platform support multiple trust sources.
> > > In case its not specified then implementation itetrates through
> > > trust sources list starting with TPM and assign the first trust
> > > source as a backend which has initiazed successfully during
> > > iteration.
> > > 
> > > Note that current implementation only supports a single trust
> > > source at runtime which is either selectable at compile time or
> > > during boot via aforementioned module parameter.
> > 
> > You never actually tested this, did you?  I'm now getting EINVAL
> > from all the trusted TPM key operations because of this patch.
> > 
> 
> Unfortunately, I don't possess a development machine with a TPM
> device. So mine testing was entirely based on TEE as a backend which
> doesn't support any optional parameters. And that being the reason I
> didn't catch this issue at first instance.
> 
> Is there any TPM emulation environment available that I can use for
> testing?

Well use the same as we all use: A software TPM running in the host
coupled with a virtual machine guest for the kernel:

https://en.opensuse.org/Software_TPM_Emulator_For_QEMU

It doesn't catch interface issues (like TIS timeouts) but it does catch
TPM operations problems like this patch had.

James


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ