Re: [PATCH v7 3/5] KEYS: Call the IMA hook to measure keys

From: Mimi Zohar
Date: Fri Nov 15 2019 - 08:14:50 EST


On Thu, 2019-11-14 at 10:24 -0800, Lakshmi Ramasubramanian wrote:
> On 11/14/2019 6:54 AM, Mimi Zohar wrote:
> > With this patch, keys are now being measured. ÂWith the boot command
> > line, we can verify the measurement entry against /proc/cmdline. ÂHow
> > can the key measurement entry be verified? ÂPlease include that
> > information, here, in this patch description.
>
> Glad you could verify measurement of keys. Thanks a lot for trying it.
>
> Will add information on testing\validating the feature.

Thank you.

>
> > Also, can the key data, now included in the measurement list, be used
> > to verify signatures in the ima-sig or ima-modsig templates? ÂIs there
> > a way of correlating a signature with a key? ÂPerhaps include a
> > kselftest as an example.
>
> I am not familiar with kselftest. Will take a look and see if it'd be
> possible to correlate a signature with a key.

I'd like the measurement list to be self contained, allowing a
regression test, for example, to walk the measurement list, verifying
the file signatures stored in the measurement list based on the key
measurement(s).

It isn't so much about Kselftest, but implementing a regression test
(eg. Kselftest, LTP, ima-evm-utils, ...) as a PoC, in order to know
that the key measurement contains everything needed to identify the
key (eg. keyid, certificate serial number, ...) and verify file
signatures.

Mimi