Re: [RFC V2] IMA Log Snapshotting Design Proposal

2023-11-22 Thread Mimi Zohar
On Tue, 2023-11-21 at 23:27 -0500, Paul Moore wrote: > On Thu, Nov 16, 2023 at 5:28 PM Paul Moore wrote: > > On Tue, Oct 31, 2023 at 3:15 PM Mimi Zohar wrote: > > ... > > > > Userspace can already export the IMA measurement list(s) via the > > > securityfs

Re: [RFC V2] IMA Log Snapshotting Design Proposal

2023-11-27 Thread Mimi Zohar
On Wed, 2023-11-22 at 09:22 -0500, Paul Moore wrote: > On Wed, Nov 22, 2023 at 8:18 AM Mimi Zohar wrote: > > On Tue, 2023-11-21 at 23:27 -0500, Paul Moore wrote: > > > On Thu, Nov 16, 2023 at 5:28 PM Paul Moore wrote: > > > > On Tue, Oct 31, 202

Re: [RFC V2] IMA Log Snapshotting Design Proposal

2023-11-28 Thread Mimi Zohar
On Mon, 2023-11-27 at 17:16 -0500, Paul Moore wrote: > On Mon, Nov 27, 2023 at 12:08 PM Mimi Zohar wrote: > > On Wed, 2023-11-22 at 09:22 -0500, Paul Moore wrote: > > ... > > > > Okay, we are starting to get closer, but I'm still missing the part > > > w

Re: [RFC V2] IMA Log Snapshotting Design Proposal

2023-11-28 Thread Mimi Zohar
On Tue, 2023-11-28 at 20:06 -0500, Paul Moore wrote: > On Tue, Nov 28, 2023 at 7:09 AM Mimi Zohar wrote: > > On Mon, 2023-11-27 at 17:16 -0500, Paul Moore wrote: > > > On Mon, Nov 27, 2023 at 12:08 PM Mimi Zohar wrote: > > > > On Wed, 2023-11-22 at

Re: [PATCH v3 00/12] ima: Fix rule parsing bugs and extend KEXEC_CMDLINE rule support

2020-07-20 Thread Mimi Zohar
[Cc'ing Sasha] On Thu, 2020-07-09 at 01:18 -0500, Tyler Hicks wrote: > I envision patches 1-7 going to stable. The series is ordered in a way > that has all the fixes up front, followed by cleanups, followed by the > feature patch. The breakdown of patches looks like so: > > Memory leak fixes:

Re: [PATCH v5 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2022-02-13 Thread Mimi Zohar
Hi Michal, On Wed, 2022-02-09 at 13:01 +0100, Michal Suchánek wrote: > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > > index dea74d7717c0..1cde9b6c5987 100644 > > > --- a/arch/powerpc/Kconfig > > > +++ b/arch/powerpc/Kconfig > > > @@ -560,6 +560,22 @@ config KEXEC_FILE > > > c

Re: [PATCH v5 0/6] KEXEC_SIG with appended signature

2022-02-13 Thread Mimi Zohar
Hi Michal, On Tue, 2022-01-11 at 12:37 +0100, Michal Suchanek wrote: > Hello, > > This is a refresh of the KEXEC_SIG series. > This adds KEXEC_SIG support on powerpc and deduplicates the code dealing > with appended signatures in the kernel. > > powerpc supports IMA_KEXEC but that's an exceptio

Re: [PATCH v5 0/6] KEXEC_SIG with appended signature

2022-02-13 Thread Mimi Zohar
[Cc'ing Nageswara R Sastry] Hi Michal, On Tue, 2022-01-11 at 12:37 +0100, Michal Suchanek wrote: > Hello, > > This is a refresh of the KEXEC_SIG series. > > This adds KEXEC_SIG support on powerpc and deduplicates the code dealing > with appended signatures in the kernel. tools/testing/selftes

Re: [PATCH v5 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2022-02-13 Thread Mimi Zohar
Hi Michal, On Tue, 2022-01-11 at 12:37 +0100, Michal Suchanek wrote: > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index dea74d7717c0..1cde9b6c5987 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -560,6 +560,22 @@ config KEXEC_FILE > config ARCH_HAS_KEXEC_PURG

Re: [PATCH v5 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2022-02-14 Thread Mimi Zohar
Hi Michal, On Sun, 2022-02-13 at 21:59 -0500, Mimi Zohar wrote: > > On Tue, 2022-01-11 at 12:37 +0100, Michal Suchanek wrote: > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > index dea74d7717c0..1cde9b6c5987 100644 > > --- a/arch/powerpc/Kconfig > &

Re: [PATCH v5 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2022-02-14 Thread Mimi Zohar
On Mon, 2022-02-14 at 16:55 +0100, Michal Suchánek wrote: > Hello, > > On Mon, Feb 14, 2022 at 10:14:16AM -0500, Mimi Zohar wrote: > > Hi Michal, > > > > On Sun, 2022-02-13 at 21:59 -0500, Mimi Zohar wrote: > > > > > > > > On Tue, 2022-01-11

Re: [RFC] Kdump with signed images

2012-10-24 Thread Mimi Zohar
On Wed, 2012-10-24 at 13:19 -0400, Vivek Goyal wrote: > On Tue, Oct 23, 2012 at 09:44:59AM -0700, Eric W. Biederman wrote: > > Matthew Garrett writes: > > > > > On Tue, Oct 23, 2012 at 10:59:20AM -0400, Vivek Goyal wrote: > > > > > >> But what about creation of a new program which can call kexec_

Re: Kdump with signed images

2012-10-24 Thread Mimi Zohar
On Wed, 2012-10-24 at 13:36 -0400, Vivek Goyal wrote: > On Tue, Oct 23, 2012 at 09:19:27AM -0700, Eric W. Biederman wrote: > > Vivek Goyal writes: > > > > > On Tue, Oct 23, 2012 at 09:18:54AM -0400, Vivek Goyal wrote: > > > > > > [..] > > >> > >> There are 3 options for trusting /sbin/kexec. The

Re: [RFC] Kdump with signed images

2012-10-25 Thread Mimi Zohar
On Wed, 2012-10-24 at 23:44 -0700, Kees Cook wrote: > On Wed, Oct 24, 2012 at 10:43 PM, Mimi Zohar wrote: > > On Wed, 2012-10-24 at 13:19 -0400, Vivek Goyal wrote: > >> On Tue, Oct 23, 2012 at 09:44:59AM -0700, Eric W. Biederman wrote: > >> > Matthew Garrett write

Re: Kdump with signed images

2012-10-25 Thread Mimi Zohar
On Thu, 2012-10-25 at 10:10 -0400, Vivek Goyal wrote: > On Thu, Oct 25, 2012 at 02:10:01AM -0400, Mimi Zohar wrote: > > [..] > > IMA-appraisal verifies the integrity of file data, while EVM verifies > > the integrity of the file metadata, such as LSM and IMA-apprai

Re: [RFC] Kdump with signed images

2012-10-25 Thread Mimi Zohar
On Thu, 2012-10-25 at 09:54 -0400, Vivek Goyal wrote: > On Thu, Oct 25, 2012 at 01:43:59AM -0400, Mimi Zohar wrote: > > On Wed, 2012-10-24 at 13:19 -0400, Vivek Goyal wrote: > > > On Tue, Oct 23, 2012 at 09:44:59AM -0700, Eric W. Biederman wrote: > > >

Re: Kdump with signed images

2012-10-25 Thread Mimi Zohar
On Thu, 2012-10-25 at 14:55 -0400, Vivek Goyal wrote: > On Thu, Oct 25, 2012 at 02:40:21PM -0400, Mimi Zohar wrote: > > On Thu, 2012-10-25 at 10:10 -0400, Vivek Goyal wrote: > > > On Thu, Oct 25, 2012 at 02:10:01AM -0400, Mimi Zohar wrote: > > > > > > [..

Re: Kdump with signed images

2012-10-26 Thread Mimi Zohar
On Fri, 2012-10-26 at 03:39 +0100, Matthew Garrett wrote: > On Thu, Oct 25, 2012 at 09:15:58PM -0400, Mimi Zohar wrote: > > > On a running system, the package installer, after verifying the package > > integrity, would install each file with the associated 'security.ima&

Re: Kdump with signed images

2012-10-26 Thread Mimi Zohar
On Fri, 2012-10-26 at 19:19 +0100, Matthew Garrett wrote: > On Fri, Oct 26, 2012 at 01:59:34PM -0400, Mimi Zohar wrote: > > On Fri, 2012-10-26 at 03:39 +0100, Matthew Garrett wrote: > > > and it must be impossible for anything other than > > > /sbin/kexec to

Re: Kdump with signed images

2012-10-26 Thread Mimi Zohar
On Fri, 2012-10-26 at 13:06 -0400, Vivek Goyal wrote: > On Fri, Oct 26, 2012 at 03:39:16AM +0100, Matthew Garrett wrote: > > On Thu, Oct 25, 2012 at 09:15:58PM -0400, Mimi Zohar wrote: > > > > > On a running system, the package installer, after verifying the package > &

Re: Kdump with signed images

2012-11-01 Thread Mimi Zohar
On Thu, 2012-11-01 at 09:53 -0400, Vivek Goyal wrote: > On Thu, Nov 01, 2012 at 09:10:03AM -0400, Vivek Goyal wrote: > > [..] > > > > > > > - So say we can sign /sbin/kexec at build time and distros can do that. > > > > - Verify the signature at exec time using kernel keyring and if > > > > ver

Re: Kdump with signed images

2012-11-08 Thread Mimi Zohar
On Thu, 2012-11-08 at 14:40 -0500, Vivek Goyal wrote: > On Tue, Nov 06, 2012 at 03:51:59PM -0800, Eric W. Biederman wrote: > > [..] > > Thnking more about executable signature verification, I have another question. > > While verifyign the signature, we will have to read the whole executable > in

Re: Kdump with signed images

2012-11-15 Thread Mimi Zohar
On Wed, 2012-11-14 at 21:09 -0800, Eric W. Biederman wrote: > Vivek Goyal writes: > > > On Thu, Nov 08, 2012 at 01:03:17PM -0800, Eric W. Biederman wrote: > >> Vivek Goyal writes: > >> > >> > On Thu, Nov 08, 2012 at 02:40:50PM -0500, Vivek Goyal wrote: > >> >> On Tue, Nov 06, 2012 at 03:51:59PM

Re: [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL

2013-03-20 Thread Mimi Zohar
On Tue, 2013-03-19 at 15:47 +1100, James Morris wrote: > On Mon, 18 Mar 2013, Matthew Garrett wrote: > > > This patch introduces CAP_COMPROMISE_KERNEL. > > I'd like to see this named CAP_MODIFY_KERNEL, which is more accurate and > less emotive. Otherwise I think core kernel developers will be

Re: [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL

2013-03-20 Thread Mimi Zohar
On Wed, 2013-03-20 at 16:49 +, Matthew Garrett wrote: > On Wed, 2013-03-20 at 12:41 -0400, Mimi Zohar wrote: > > > Matthrew, perhaps you could clarify whether this will be tied to MAC > > security. Based on the kexec thread, I'm under the impression that is > > n

Re: [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL

2013-03-20 Thread Mimi Zohar
On Wed, 2013-03-20 at 18:12 +, Matthew Garrett wrote: > On Wed, 2013-03-20 at 14:01 -0400, Mimi Zohar wrote: > > > Sorry, I'm not sure to which work you're referring. If you're referring > > to Dmitry's "initramfs with digital signature protect

Re: [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL

2013-03-20 Thread Mimi Zohar
On Wed, 2013-03-20 at 20:37 +, Matthew Garrett wrote: > On Wed, 2013-03-20 at 15:16 -0400, Mimi Zohar wrote: > > On Wed, 2013-03-20 at 18:12 +, Matthew Garrett wrote: > > > Well, in the absence of hardcoded in-kernel policy, there needs to be > > > some mechanism

Re: [PATCH 04/16] integrity: Allow digital signature verification with a given keyring ptr

2013-09-11 Thread Mimi Zohar
On Tue, 2013-09-10 at 17:44 -0400, Vivek Goyal wrote: > Currently digital signature verification code assumes that it can be > used only with 3 keyrings. IMA, EVM and MODULE keyring. Provide another > variant where one can pass in a pointer to keyring (struct key *), and > integrity code can try to

Re: [PATCH 00/16] [RFC PATCH] Signed kexec support

2013-09-12 Thread Mimi Zohar
On Thu, 2013-09-12 at 09:17 -0700, Greg KH wrote: > On Thu, Sep 12, 2013 at 07:43:36AM -0400, Vivek Goyal wrote: > > On Wed, Sep 11, 2013 at 08:40:23PM -0700, Greg KH wrote: > > > On Tue, Sep 10, 2013 at 05:44:15PM -0400, Vivek Goyal wrote: > > > > Hi, > > > > > > > > Matthew has been posting patc

Re: [PATCH v3 1/7] ima: define and call ima_alloc_kexec_file_buf

2023-12-20 Thread Mimi Zohar
On Fri, 2023-12-15 at 17:07 -0800, Tushar Sugandhi wrote: > Refactor ima_dump_measurement_list() to move the memory allocation part > to a separate function ima_alloc_kexec_file_buf() to allocate buffer of > size 'kexec_segment_size' at kexec 'load'. Make the local variables in > function ima_dump

Re: [PATCH v3 2/7] ima: kexec: move ima log copy from kexec load to execute

2023-12-20 Thread Mimi Zohar
Hi Tushar, On Fri, 2023-12-15 at 17:07 -0800, Tushar Sugandhi wrote: > ima_dump_measurement_list() is called from ima_add_kexec_buffer() during > kexec 'load', which may result in loss of IMA measurements between kexec > 'load' and 'execute'. It needs to be called during kexec 'execute'. > > Im

Re: [PATCH v3 6/7] ima: configure memory to log events between kexec load and execute

2023-12-20 Thread Mimi Zohar
Hi Tushar, The Subject line should include the word "extra". The use of the extra memory isn't limited to the measurements between the kexec load and exec. Additional records could be added as a result of the kexec load itself. Let's simplify the title to "ima: make the kexec extra memory conf

Re: [PATCH v3 7/7] ima: measure kexec load and exec events as critical data

2023-12-20 Thread Mimi Zohar
On Fri, 2023-12-15 at 17:07 -0800, Tushar Sugandhi wrote: > There could be a potential mismatch between IMA measurements and TPM PCR > quotes caused by the indeterminate interval between kexec 'load' and > 'execute'. Memory allocated at kexec 'load' for IMA log buffer may run > out. It can lead to

Re: [PATCH v3 5/7] ima: suspend measurements during buffer copy at kexec execute

2023-12-20 Thread Mimi Zohar
On Fri, 2023-12-15 at 17:07 -0800, Tushar Sugandhi wrote: > If the new measurements are added to the IMA log while it is being > being copied to the kexec buffer during kexec 'execute', it can miss > copying those new measurements to the kexec buffer, and the buffer can go > out of sync with TPM P

Re: [RFC V2] IMA Log Snapshotting Design Proposal

2024-01-07 Thread Mimi Zohar
On Sat, 2024-01-06 at 18:27 -0500, Paul Moore wrote: > On Tue, Nov 28, 2023 at 9:07 PM Mimi Zohar wrote: > > On Tue, 2023-11-28 at 20:06 -0500, Paul Moore wrote: > > > On Tue, Nov 28, 2023 at 7:09 AM Mimi Zohar wrote: > > > > On Mon, 2023-11-27 at 17:16 -0500, Paul

Re: [PATCH v3 7/7] ima: measure kexec load and exec events as critical data

2024-01-07 Thread Mimi Zohar
On Fri, 2024-01-05 at 12:22 -0800, Tushar Sugandhi wrote: > >> @@ -194,6 +206,15 @@ static int ima_update_kexec_buffer(struct > >> notifier_block *self, > >> return ret; > >> } > >> > >> +buf_size = ima_get_binary_runtime_size(); > >> +scnprintf(ima_kexec_event, IMA_KE

Re: [PATCH v3 6/7] ima: configure memory to log events between kexec load and execute

2024-01-07 Thread Mimi Zohar
On Fri, 2024-01-05 at 12:20 -0800, Tushar Sugandhi wrote: > >> diff --git a/security/integrity/ima/Kconfig > >> b/security/integrity/ima/Kconfig > >> index 60a511c6b583..8792b7aab768 100644 > >> --- a/security/integrity/ima/Kconfig > >> +++ b/security/integrity/ima/Kconfig > >> @@ -338,3 +338,12 @

Re: [RFC V2] IMA Log Snapshotting Design Proposal

2024-01-08 Thread Mimi Zohar
On Sun, 2024-01-07 at 21:58 -0500, Paul Moore wrote: > On Sun, Jan 7, 2024 at 7:59 AM Mimi Zohar wrote: > > On Sat, 2024-01-06 at 18:27 -0500, Paul Moore wrote: > > > On Tue, Nov 28, 2023 at 9:07 PM Mimi Zohar wrote: > > > > On Tue, 2023-11-28 at 20:06 -0500, Paul

Re: [PATCH v3 5/7] ima: suspend measurements during buffer copy at kexec execute

2024-01-11 Thread Mimi Zohar
On Fri, 2024-01-05 at 11:50 -0800, Tushar Sugandhi wrote: > > On 12/20/23 12:44, Mimi Zohar wrote: > > On Fri, 2023-12-15 at 17:07 -0800, Tushar Sugandhi wrote: > >> If the new measurements are added to the IMA log while it is being > >> being copied to the kexec buf

Re: [PATCH v3 2/7] ima: kexec: move ima log copy from kexec load to execute

2024-01-12 Thread Mimi Zohar
Hi Tushar, > > This patch moves the ima_dump_measurement_list() call from kexec load > > to exec, but doesn't register the reboot notifier in this patch. I > > don't see how it is possible with just the previous and this patch > > applied that the measurement list is carried across kexec. > Ah. T

Re: [PATCH v3 6/7] ima: configure memory to log events between kexec load and execute

2024-01-12 Thread Mimi Zohar
On Thu, 2024-01-11 at 12:52 -0800, Tushar Sugandhi wrote: [...] > If we go with the KBs approach - > > half-a-page translates to different KBs on different architectures. > And setting the right default value in KBs which would translate to > the desired half-a-page, on a given arch, inside the Kc

Re: [PATCH v4 1/7] ima: define and call ima_alloc_kexec_file_buf

2024-01-24 Thread Mimi Zohar
Hi Tushar, On Mon, 2024-01-22 at 10:37 -0800, Tushar Sugandhi wrote: Missing from this and the other patch descriptions is the problem description. Please refer to the section titled "Describe your changes" in https://docs.kernel.org/process/submitting-patches.html. "Describe your problem. W

Re: [PATCH v4 6/7] ima: make the kexec extra memory configurable

2024-01-24 Thread Mimi Zohar
> --- a/security/integrity/ima/ima_kexec.c > +++ b/security/integrity/ima/ima_kexec.c > @@ -121,6 +121,7 @@ void ima_add_kexec_buffer(struct kimage *image) > .buf_min = 0, .buf_max = ULONG_MAX, > .top_down = true }; > unsigned

Re: [PATCH v4 7/7] ima: measure kexec load and exec events as critical data

2024-01-24 Thread Mimi Zohar
On Mon, 2024-01-22 at 10:38 -0800, Tushar Sugandhi wrote: The problem statement could be written as: The amount of memory allocated at kexec load, even with the extra memory allocated, might not be large enough for the entire measurement list. The indeterminate interval between kexec 'load' and

Re: [PATCH v4 4/7] ima: kexec: move ima log copy from kexec load to execute

2024-01-24 Thread Mimi Zohar
On Mon, 2024-01-22 at 10:38 -0800, Tushar Sugandhi wrote: > ima_dump_measurement_list() is called during kexec 'load', which may > result in loss of IMA measurements during kexec soft reboot. It needs > to be called during kexec 'execute'. > > The below changes need to be part of the same patch t

Re: [PATCH v5 1/8] ima: define and call ima_alloc_kexec_file_buf

2024-02-20 Thread Mimi Zohar
On Wed, 2024-02-14 at 07:38 -0800, Tushar Sugandhi wrote: > Carrying the IMA measurement list across kexec requires allocating a > buffer and copying the measurement records. Separate allocating the > buffer and copying the measurement records into separate functions in > order to allocate the buf

Re: [PATCH v5 0/8] ima: kexec: measure events between kexec load and execute

2024-02-20 Thread Mimi Zohar
On Wed, 2024-02-14 at 07:38 -0800, Tushar Sugandhi wrote: > The current Kernel behavior is IMA measurements snapshot is taken at > kexec 'load' and not at kexec 'execute'. IMA log is then carried > over to the new Kernel after kexec 'execute'. 'Kernel' should not be capitalized since it isn't a p

Re: [PATCH v5 2/8] kexec: define functions to map and unmap segments

2024-02-21 Thread Mimi Zohar
On Wed, 2024-02-14 at 07:38 -0800, Tushar Sugandhi wrote: > Currently, the mechanism to map and unmap segments to the kimage > structure is not available to the subsystems outside of kexec. This > functionality is needed when IMA is allocating the memory segments > during kexec 'load' operation.

Re: [PATCH v5 4/8] ima: kexec: define functions to copy IMA log at soft boot

2024-02-21 Thread Mimi Zohar
On Wed, 2024-02-14 at 22:55 -0800, Tushar Sugandhi wrote: > > On 2/14/24 12:47, Stefan Berger wrote: > > > > On 2/14/24 10:38, Tushar Sugandhi wrote: > ... > > ... > > > +void kimage_file_post_load(struct kimage *image) > > > +{ > > > +ima_kexec_post_load(image); > > > +} > > > + > > > > We

Re: [PATCH v5 4/8] ima: kexec: define functions to copy IMA log at soft boot

2024-02-21 Thread Mimi Zohar
Additional comments ... > diff --git a/security/integrity/ima/ima_kexec.c > b/security/integrity/ima/ima_kexec.c > index ccb072617c2d..1d4d6c122d82 100644 > --- a/security/integrity/ima/ima_kexec.c > +++ b/security/integrity/ima/ima_kexec.c > @@ -12,10 +12,14 @@ > #include > #include > #inclu

Re: [PATCH v5 5/8] ima: kexec: move IMA log copy from kexec load to execute

2024-02-21 Thread Mimi Zohar
> @@ -195,7 +181,34 @@ void ima_add_kexec_buffer(struct kimage *image) > static int ima_update_kexec_buffer(struct notifier_block *self, > unsigned long action, void *data) > { > - return NOTIFY_OK; > + void *buf = NULL; > + size_t buf_size; > +

Re: [PATCH v5 6/8] ima: suspend measurements during buffer copy at kexec execute

2024-02-22 Thread Mimi Zohar
Hi Tushar, On Wed, 2024-02-14 at 07:38 -0800, Tushar Sugandhi wrote: > New measurements added to the IMA log while the log is being copied > during the kexec 'execute' may not get copied over. As long as there is enough memory for the additional records, isn't the problem "after" copying the mesa

Re: [PATCH v5 7/8] ima: make the kexec extra memory configurable

2024-02-22 Thread Mimi Zohar
Hi Tushar, On Wed, 2024-02-14 at 07:38 -0800, Tushar Sugandhi wrote: > The extra memory allocated for carrying the IMA measurement list across > kexec is hard-coded as half a PAGE. Make it configurable. > > Define a Kconfig option, IMA_KEXEC_EXTRA_MEMORY_KB, to configure the > extra memory (in k

Re: [PATCH v5 6/8] ima: suspend measurements during buffer copy at kexec execute

2024-02-22 Thread Mimi Zohar
> > @@ -176,6 +195,19 @@ int ima_add_template_entry(struct ima_template_entry > > *entry, int violation, > > } > > } > > > > + /* > > +* suspend_ima_measurements will be set if the system is > > +* undergoing kexec soft boot to a new kernel. > > +* suspending measu

<    1   2   3   4   5