linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roberto Sassu <roberto.sassu@huawei.com>
To: Mimi Zohar <zohar@linux.ibm.com>,
	"mjg59@srcf.ucam.org" <mjg59@srcf.ucam.org>
Cc: "linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v7 00/12] evm: Improve usability of portable signatures
Date: Fri, 21 May 2021 07:07:14 +0000	[thread overview]
Message-ID: <a316bc5ec316446c8b07134c33b06d77@huawei.com> (raw)
In-Reply-To: <2804f10fa77b58b4992f56ea36a36d4f1e3f4b24.camel@linux.ibm.com>

> From: Mimi Zohar [mailto:zohar@linux.ibm.com]
> Sent: Thursday, May 20, 2021 8:56 PM
> On Fri, 2021-05-14 at 17:27 +0200, Roberto Sassu wrote:
> > EVM portable signatures are particularly suitable for the protection of
> > metadata of immutable files where metadata is signed by a software vendor.
> > They can be used for example in conjunction with an IMA policy that
> > appraises only executed and memory mapped files.
> >
> > However, until now portable signatures can be properly installed only if
> > the EVM_ALLOW_METADATA_WRITES initialization flag is also set, which
> > disables metadata verification until an HMAC key is loaded. This will cause
> > metadata writes to be allowed even in the situations where they shouldn't
> > (metadata protected by a portable signature is immutable).
> >
> > The main reason why setting the flag is necessary is that the operations
> > necessary to install portable signatures and protected metadata would be
> > otherwise denied, despite being legitimate, due to the fact that the
> > decision logic has to avoid an unsafe recalculation of the HMAC that would
> > make the unsuccessfully verified metadata valid. However, the decision
> > logic is too coarse, and does not fully take into account all the possible
> > situations where metadata operations could be allowed.
> >
> > For example, if the HMAC key is not loaded and it cannot be loaded in the
> > future due the EVM_SETUP_COMPLETE flag being set, it wouldn't be a
> problem
> > to allow metadata operations, as they wouldn't result in an HMAC being
> > recalculated.
> >
> > This patch set extends the decision logic and adds the necessary exceptions
> > to use portable signatures without turning off metadata verification and
> > deprecates the EVM_ALLOW_METADATA_WRITES flag.
> 
> Thanks, Roberto.
> 
> Applied to: git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-
> integrity.git
> next-integrity-testing

Hi Mimi

could you please take the newer version of patch 5/12, which also adds
an exception for the INTEGRITY_UNKNOWN error (it occurs when xattrs
are not supported)?

https://lore.kernel.org/linux-integrity/6d7e059876b64f249b9a01d8b7696e29@huawei.com/T/#m58442ec12e47d9d457bef9b438809a6a132b7512

Thanks

Roberto

HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Li Jian, Shi Yanli

  reply	other threads:[~2021-05-21  7:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 15:27 [PATCH v7 00/12] evm: Improve usability of portable signatures Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 01/12] evm: Execute evm_inode_init_security() only when an HMAC key is loaded Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 02/12] evm: Load EVM key in ima_load_x509() to avoid appraisal Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 03/12] evm: Refuse EVM_ALLOW_METADATA_WRITES only if an HMAC key is loaded Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 04/12] evm: Introduce evm_revalidate_status() Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 05/12] evm: Introduce evm_hmac_disabled() to safely ignore verification errors Roberto Sassu
2021-05-20  8:48   ` [RESEND][PATCH " Roberto Sassu
2021-05-20  8:51     ` Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 06/12] evm: Allow xattr/attr operations for portable signatures Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 07/12] evm: Pass user namespace to set/remove xattr hooks Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 08/12] evm: Allow setxattr() and setattr() for unmodified metadata Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 09/12] evm: Deprecate EVM_ALLOW_METADATA_WRITES Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 10/12] ima: Allow imasig requirement to be satisfied by EVM portable signatures Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 11/12] ima: Introduce template field evmsig and write to field sig as fallback Roberto Sassu
2021-05-14 15:27 ` [PATCH v7 12/12] ima: Don't remove security.ima if file must not be appraised Roberto Sassu
2021-05-20 18:55 ` [PATCH v7 00/12] evm: Improve usability of portable signatures Mimi Zohar
2021-05-21  7:07   ` Roberto Sassu [this message]
2021-05-21 17:31     ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a316bc5ec316446c8b07134c33b06d77@huawei.com \
    --to=roberto.sassu@huawei.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).