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: <a96e41bd0d4cdc726a80ae24901bcda1e887a65a.camel@huaweicloud.com>
Date: Fri, 06 Sep 2024 13:25:06 +0200
From: Roberto Sassu <roberto.sassu@...weicloud.com>
To: Jarkko Sakkinen <jarkko@...nel.org>, corbet@....net,
 zohar@...ux.ibm.com,  dmitry.kasatkin@...il.com, eric.snowberg@...cle.com,
 paul@...l-moore.com,  jmorris@...ei.org, serge@...lyn.com
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org, 
 linux-integrity@...r.kernel.org, linux-security-module@...r.kernel.org, 
 wufan@...ux.microsoft.com, pbrobinson@...il.com, zbyszek@...waw.pl,
 hch@....de,  mjg59@...f.ucam.org, pmatilai@...hat.com, jannh@...gle.com,
 dhowells@...hat.com,  jikos@...nel.org, mkoutny@...e.com, ppavlu@...e.com,
 petr.vorel@...il.com,  mzerqung@...inter.de, kgold@...ux.ibm.com, Roberto
 Sassu <roberto.sassu@...wei.com>
Subject: Re: [RFC][PATCH v3 04/10] ima: Add digest_cache_measure/appraise
 boot-time built-in policies

On Fri, 2024-09-06 at 12:45 +0300, Jarkko Sakkinen wrote:
> On Thu Sep 5, 2024 at 6:25 PM EEST, Roberto Sassu wrote:
> > From: Roberto Sassu <roberto.sassu@...wei.com>
> > 
> > Specify the 'digest_cache_measure' boot-time policy with 'ima_policy=' in
> > the kernel command line to add the following rule at the beginning of the
> > IMA policy, before other rules:
> > 
> > measure func=DIGEST_LIST_CHECK pcr=12
> > 
> > which will measure digest lists into PCR 12 (or the value in
> > CONFIG_IMA_DIGEST_CACHE_MEASURE_PCR_IDX).
> > 
> > Specify 'digest_cache_appraise' to add the following rule at the beginning,
> > before other rules:
> > 
> > appraise func=DIGEST_LIST_CHECK appraise_type=imasig|modsig
> > 
> > which will appraise digest lists with IMA signatures or module-style
> > appended signatures.
> > 
> > Adding those rule at the beginning rather than at the end is necessary to
> > ensure that digest lists are measured and appraised in the initial ram
> > disk, which would be otherwise prevented by the dont_ rules.
> > 
> > Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> > ---
> >  .../admin-guide/kernel-parameters.txt         | 10 +++++-
> >  security/integrity/ima/Kconfig                | 10 ++++++
> >  security/integrity/ima/ima_policy.c           | 35 +++++++++++++++++++
> >  3 files changed, 54 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index 09126bb8cc9f..afaaf125a237 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -2077,7 +2077,8 @@
> >  	ima_policy=	[IMA]
> >  			The builtin policies to load during IMA setup.
> >  			Format: "tcb | appraise_tcb | secure_boot |
> > -				 fail_securely | critical_data"
> > +				 fail_securely | critical_data |
> > +				 digest_cache_measure | digest_cache_appraise"
> >  
> >  			The "tcb" policy measures all programs exec'd, files
> >  			mmap'd for exec, and all files opened with the read
> > @@ -2099,6 +2100,13 @@
> >  			The "critical_data" policy measures kernel integrity
> >  			critical data.
> >  
> > +			The "digest_cache_measure" policy measures digest lists
> > +			into PCR 12 (can be changed with kernel config).
> > +
> > +			The "digest_cache_appraise" policy appraises digest
> > +			lists with IMA signatures or module-style appended
> > +			signatures.
> > +
> >  	ima_tcb		[IMA] Deprecated.  Use ima_policy= instead.
> >  			Load a policy which meets the needs of the Trusted
> >  			Computing Base.  This means IMA will measure all
> 
> Must be updated as a separate commit as kernel-parameters.txt not
> part of IMA. Consider it as a different subsystem in this context.

Can be done, but this would be more like an atomic change in case the
patch is reverted.

Thanks

Roberto


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ