Re: [tpmdd-devel] [PATCH RFC 0/4] RFC: in-kernel resource manager
From: Jason Gunthorpe
Date: Wed Jan 04 2017 - 14:26:10 EST
On Wed, Jan 04, 2017 at 10:57:51AM -0800, James Bottomley wrote:
> > You are doing all this work to get the user space side in shape, I'd
> > like to see matching kernel support. To me that means out-of-the-box
> > a user can just use your plugins, the plugins will access /dev/tmps
> > and everything will work fine for RSA key storage.
>
> Actually, not necessarily; you're not considering the setup issue:
> right at the moment users get delivered TPMs mostly in the cleared
I have no problem with users being instructed to do 'sudo
tpm2-provision' or having that happen via GUI using the usual
privilege escalation techniques.
> state (thankfully they no longer have to clear via bios). So the first
> thing a new user has to do is set all the authorizations and create an
> SRK equivalent primary object at 0x81000001. I think in the interests
> of best practice we want to make that as easy as possible; saying they
> have to do this as root and use a different device is problematic.
The device names should never be exposed to the user. The user should
specify a chip number (default to 0) and the tools should select the
correct available device to do what the user is asking.
First try /dev/tpms and elevate filter, then try /dev/tpmX, then fail.
> You can say they don't have to use a different device because the
> filter can be lifted for root, but then how do I lock down root apps
> for this untrusted root setup secure boot has going on?
Presumably the same way you lock down /dev/tpm0 today?
selinux I guess?
> I suppose we could use TPMA_PERMANENT for this. The first three bits
> indicate whether the authorizations are set, so if they're all clear,
> we can assume an unowned TPM and lift the filter? A sort of trust on
> first use model.
I feel tpm provisioning is something that should only be done by the
system owner, and that means root in unix parlance.
I don't want random end-users provisioning the TPM in my server, for
instance.
Jason