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]
Message-ID: <67f0fe5874638241bc2f2401dc2bc12c51becc0b.camel@linux.ibm.com>
Date:   Wed, 11 May 2022 13:53:23 -0400
From:   Mimi Zohar <zohar@...ux.ibm.com>
To:     Jonathan McDowell <noodles@...com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
        James Morris <jmorris@...ei.org>,
        "Serge E. Hallyn" <serge@...lyn.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
        "linux-security-module@...r.kernel.org" 
        <linux-security-module@...r.kernel.org>
Subject: Re: [PATCH v3] x86/kexec: Carry forward IMA measurement log on kexec

Hi Jonathan,

On Wed, 2022-05-11 at 09:59 +0000, Jonathan McDowell wrote:
> On kexec file load Integrity Measurement Architecture (IMA) subsystem
> may verify the IMA signature of the kernel and initramfs, and measure
> it. The command line parameters passed to the kernel in the kexec call
> may also be measured by IMA. A remote attestation service can verify
> a TPM quote based on the TPM event log, the IMA measurement list, and
> the TPM PCR data. This can be achieved only if the IMA measurement log
> is carried over from the current kernel to the next kernel across
> the kexec call.
> 
> powerpc and ARM64 both achieve this using device tree with a
> "linux,ima-kexec-buffer" node. x86 platforms generally don't make use of
> device tree, so use the setup_data mechanism to pass the IMA buffer to
> the new kernel.
> 
> Signed-off-by: Jonathan McDowell <noodles@...com>
> ---
> v3:
>  - Rebase on tip/master

This patch doesn't apply to Linus' master branch.  Which tip/master
branch?  In the future, please use the git format-patch "--base=auto"
option.

>  - Pull ima_(free|get)_kexec_buffer into x86 code
>  - Push ifdefs into functions where possible
>  - Reverse fir tree variable declarations
>  - Fix section annotation on ima_free_kexec_buffer (__meminit)
>  - Only allocate ima_setup_data space when IMA_KEXEC is enabled

IMA_KEXEC only controls whether the current measurement list should be
carried across kexec, not restoring the previous measurement list.

> v2:
>  - Fix operation with EFI systems
> ---

> +++ b/include/linux/ima.h
> @@ -140,6 +140,9 @@ static inline int ima_measure_critical_data(const char *event_label,
>  
>  #endif /* CONFIG_IMA */
>  
> +int ima_free_kexec_buffer(void);
> +int ima_get_kexec_buffer(void **addr, size_t *size);

Wouldn't moving these function definitions here imply they are
implemented on all architectures or are using the version in
drivers/of/kexec.c.

thanks,

Mimi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ