Re: [RFC 2/2] initramfs with digital signature protection

From: Mimi Zohar
Date: Fri Apr 12 2013 - 08:03:27 EST


On Thu, 2013-04-11 at 17:13 -0400, Vivek Goyal wrote:
> On Thu, Apr 11, 2013 at 09:42:54PM +0300, Dmitry Kasatkin wrote:
>
> [..]
> > > What other initialization user space need to do where we can't trust
> > > root (even in secureboot mode).
> > >
> > > IOW, if keys can be embedded in kernel (or read from UEFI db and MOK db),
> > > what other operation requires initramfs to be signed. It could very well
> > > be unsigned initramfs like today.
> > >
> >
> > It looks like you do not hear me.
> > I said that any user space initialization can be done from signed user space.
> > For example IMA policy can be initialized.
> >
>
> I am hearing you. Yes I heard you saying "but perform other initialization,
> which requires user-space". I am just trying to figure out more details.
> You are assuming that a single line statement gives all the context and it
> often might not be the case.
>
> What makes it important that IMA policy is loaded from an signed initramfs
> and not from unsigned one.

> Also how would you make use of it without secureboot. Only secureboot will
> allow to keep keys in firmware so that one can have a key in there and be
> able to sign initramfs.

You don't have a monopoly on secure boot. We're all assuming a secure
boot environment. The only question is what happens afterwards. You're
interested in appraising a few particular files: kernel modules, kexec,
and the files kexec loads. I'm interested in having all files in the
TCB measured and appraised. Dmitry is interested in having all files
appraised. The kernel needs to be able to support these and other
scenarios.

> In regular system, distributions do not ship pre-loaded keys so one can
> not sign initramfs. So only thing possible is that distributions enforce
> some policy in signed initramfs and if distributions have to enforce a
> policy they can do that in kernel itself and no need for signed initramfs.

The difference is that one hard codes policy in the kernel, while the
other doesn't. Having the policy in a signed initramfs, permits the
platform owner, for example, to change the policy.

Having said this, both Dmitry and I agreed with you that the UEFI keys
can be loaded from the kernel. We disagree with you, that there is no
other purpose for a signed early initramfs. Dmitry's example was
loading the IMA policy. Another example is locking the _ima keyring.
Each scenario has its own requirements.

thanks,

Mimi


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/