linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA
@ 2019-03-22 17:39 Lakshmi Ramasubramanian
  2019-03-25 17:52 ` Lakshmi Ramasubramanian
  2019-03-25 19:27 ` Mimi Zohar
  0 siblings, 2 replies; 4+ messages in thread
From: Lakshmi Ramasubramanian @ 2019-03-22 17:39 UTC (permalink / raw)
  To: linux-integrity, linux-kernel

Hello,

When loading the new kernel image file for executing KEXEC system call, 
we would like to verify that the kernel image file is signed and 
the signer certificate is valid. 

If the kernel image file is in Portable Executable (PE) format we want to 
validate the PE Signature and measure the signer X.509 certificate 
(Extend as part of IMA Template defaulting to PCR 10, if not otherwise set, 
 and the IMA measurement log).

We plan to use Integrity Measurement Architecture (IMA) for the above.

Please let us know if anyone is already working on a patch set
for such a functionality.

I am aware of the work that Thiago Jung Bauermann @ IBM is doing for 
"Appended signatures support for IMA appraisal" 
(Web link given below)

    https://lkml.org/lkml/2018/12/12/1049

Thank You.
 -lakshmi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA
  2019-03-22 17:39 Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA Lakshmi Ramasubramanian
@ 2019-03-25 17:52 ` Lakshmi Ramasubramanian
  2019-03-25 19:27 ` Mimi Zohar
  1 sibling, 0 replies; 4+ messages in thread
From: Lakshmi Ramasubramanian @ 2019-03-25 17:52 UTC (permalink / raw)
  To: zohar, linux-integrity, linux-kernel

Hello Mimi,

Could you please let me know if you have any concerns with this approach?

Thanks,
 -lakshmi

-----Original Message-----
From: linux-integrity-owner@vger.kernel.org <linux-integrity-owner@vger.kernel.org> On Behalf Of Lakshmi Ramasubramanian
Sent: Friday, March 22, 2019 10:39 AM
To: linux-integrity@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA

Hello,

When loading the new kernel image file for executing KEXEC system call, we would like to verify that the kernel image file is signed and the signer certificate is valid. 

If the kernel image file is in Portable Executable (PE) format we want to validate the PE Signature and measure the signer X.509 certificate (Extend as part of IMA Template defaulting to PCR 10, if not otherwise set,  and the IMA measurement log).

We plan to use Integrity Measurement Architecture (IMA) for the above.

Please let us know if anyone is already working on a patch set for such a functionality.

I am aware of the work that Thiago Jung Bauermann @ IBM is doing for "Appended signatures support for IMA appraisal" 
(Web link given below)

    https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2018%2F12%2F12%2F1049&amp;data=02%7C01%7Cnramas%40microsoft.com%7C2791f20f548e4502060108d6aeed54a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636888731683001667&amp;sdata=ai2KrDlnyyEqJfLS9kYUw0ebUTbq7Y5dTqMciwSRZ%2BM%3D&amp;reserved=0

Thank You.
 -lakshmi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA
  2019-03-22 17:39 Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA Lakshmi Ramasubramanian
  2019-03-25 17:52 ` Lakshmi Ramasubramanian
@ 2019-03-25 19:27 ` Mimi Zohar
  2019-03-25 21:00   ` Lakshmi Ramasubramanian
  1 sibling, 1 reply; 4+ messages in thread
From: Mimi Zohar @ 2019-03-25 19:27 UTC (permalink / raw)
  To: Lakshmi Ramasubramanian, linux-integrity, linux-kernel

Hi Lakshmi,

On Fri, 2019-03-22 at 17:39 +0000, Lakshmi Ramasubramanian wrote:
> Hello,
> 
> When loading the new kernel image file for executing KEXEC system call, 
> we would like to verify that the kernel image file is signed and 
> the signer certificate is valid.

I'm not sure what is meant by "and the signer certificate is valid".

The kexec kernel image signature can be verified by keys either on the
IMA keyring or the platform keyring.  The current method of verifying
keys being added to the IMA keyring is by requiring them to be signed
by a key on the builtin trusted keyring.  This provides a signature
chain of trust from boot to the kernel, based on a HW root of trust,
and then transitions to the kernel image's embedded keys.  You
probably already know as to why/how the platform keys are trusted.

> 
> If the kernel image file is in Portable Executable (PE) format we want to 
> validate the PE Signature and measure the signer X.509 certificate 
> (Extend as part of IMA Template defaulting to PCR 10, if not otherwise set, 
>  and the IMA measurement log).

How/when do you plan to "measure the signer X.509 certificate"?  Is
this when the certificate is being loaded onto the keyring or at use?
 I'm not sure how much of the certificate is available once loaded
onto the keyring.

> 
> We plan to use Integrity Measurement Architecture (IMA) for the above.
> 
> Please let us know if anyone is already working on a patch set
> for such a functionality.
> 
> I am aware of the work that Thiago Jung Bauermann @ IBM is doing for 
> "Appended signatures support for IMA appraisal" 
> (Web link given below)
> 
>     https://lkml.org/lkml/2018/12/12/1049

Other than Thiago, I'm not aware of anyone else working on this.
 Thiago is actively working on these patches and will be re-posting
them shortly.

Mimi


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA
  2019-03-25 19:27 ` Mimi Zohar
@ 2019-03-25 21:00   ` Lakshmi Ramasubramanian
  0 siblings, 0 replies; 4+ messages in thread
From: Lakshmi Ramasubramanian @ 2019-03-25 21:00 UTC (permalink / raw)
  To: Mimi Zohar, linux-integrity, linux-kernel

Thanks for your response Mimi.

Please see my responses to your queries inline. 

Thanks,
 -lakshmi

>-----Original Message-----
>From: Mimi Zohar <zohar@linux.ibm.com> 
>Sent: Monday, March 25, 2019 12:28 PM
>To: Lakshmi Ramasubramanian <nramas@microsoft.com>; linux-integrity@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: Re: Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA

>Hi Lakshmi,

>On Fri, 2019-03-22 at 17:39 +0000, Lakshmi Ramasubramanian wrote:
>> Hello,
>> 
>> When loading the new kernel image file for executing KEXEC system call, 
>> we would like to verify that the kernel image file is signed and 
>> the signer certificate is valid.
>>

> I'm not sure what is meant by "and the signer certificate is valid".

> The kexec kernel image signature can be verified by keys either on the
> IMA keyring or the platform keyring.  The current method of verifying
> keys being added to the IMA keyring is by requiring them to be signed
> by a key on the builtin trusted keyring.  This provides a signature
> chain of trust from boot to the kernel, based on a HW root of trust,
> and then transitions to the kernel image's embedded keys.  You
> probably already know as to why/how the platform keys are trusted.

[Lakshmi] By "signer certificate is valid" I meant, the key used to sign the kexec kernel image is trusted. 
                  We will verify the signature using the key in the IMA keyring 
                  (like the way you have described above)

>> 
>> If the kernel image file is in Portable Executable (PE) format we want to 
>> validate the PE Signature and measure the signer X.509 certificate 
>> (Extend as part of IMA Template defaulting to PCR 10, if not otherwise set, 
>>  and the IMA measurement log).

> How/when do you plan to "measure the signer X.509 certificate"?  Is
> this when the certificate is being loaded onto the keyring or at use?
> I'm not sure how much of the certificate is available once loaded
> onto the keyring.

[Lakshmi] We will measure the signer certificate when the file is loaded - in other words, "at use".
The kernel image signer information measured in to the IMA log will then be used as one of the attestation criteria.

>> 
>> We plan to use Integrity Measurement Architecture (IMA) for the above.
>> 
>> Please let us know if anyone is already working on a patch set
>> for such a functionality.
>> 
>> I am aware of the work that Thiago Jung Bauermann @ IBM is doing for 
>> "Appended signatures support for IMA appraisal" 
>> (Web link given below)
>> 
>>     https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2018%2F12%2F12%2F1049&amp;data=02%7C01%7Cnramas%40microsoft.com%7Cc36d42cb91214cc3ca1308d6b157f962%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636891388745548879&amp;sdata=OLtkuptXQYZHuvlVmn3ej%2FpEk501TxzToEcbOref0UU%3D&amp;reserved=0

> Other than Thiago, I'm not aware of anyone else working on this.
>  Thiago is actively working on these patches and will be re-posting
> them shortly.

[Lakshmi] Thanks for the information.

> Mimi

Thanks,
 -lakshmi


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-25 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 17:39 Portable Executable (PE) Signature Validation and Measurement for KEXEC system call using IMA Lakshmi Ramasubramanian
2019-03-25 17:52 ` Lakshmi Ramasubramanian
2019-03-25 19:27 ` Mimi Zohar
2019-03-25 21:00   ` Lakshmi Ramasubramanian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).