All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>, dmitry.kasatkin@gmail.com
Cc: linux-integrity@vger.kernel.org, vt@altlinux.org, pvorel@suse.cz,
	stefanb@linux.ibm.com, paul@paul-moore.com,
	casey@schaufler-ca.com, Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH v3 ima-evm-utils 4/4] Add simple tests to check EVM HMAC calculation
Date: Fri, 23 Jun 2023 10:30:15 -0400	[thread overview]
Message-ID: <06d377cb2be8a23140c9f78c2d4dbf1bbcbef692.camel@linux.ibm.com> (raw)
In-Reply-To: <01135b4f26d4460179f3b7981d4736f73fa889ba.camel@huaweicloud.com>

On Fri, 2023-06-23 at 13:45 +0200, Roberto Sassu wrote:
> On Fri, 2023-06-23 at 07:42 -0400, Mimi Zohar wrote:
> > Hi Roberto,
> > 
> > On Fri, 2023-06-16 at 21:23 +0200, Roberto Sassu wrote:
> > > From: Roberto Sassu <roberto.sassu@huawei.com>
> > > 
> > > Add a simple test to ensure that the kernel and evmctl provide the same
> > > result for the HMAC calculation. Do it with SELinux or Smack, whichever is
> > > available (if the UML kernel is used, the test is done with both LSMs).
> > > 
> > > Also add another test to evaluate the HMAC on a directory for which Smack
> > > added the SMACK64TRANSMUTE xattr.
> > > 
> > > The second test fails without the kernel patch 'smack: Set the
> > > SMACK64TRANSMUTE xattr in smack_inode_init_security()', as Smack uses
> > > __vfs_setxattr() to set SMACK64TRANSMUTE, which does not go through EVM,
> > > and makes the HMAC invalid.
> > > 
> > > Require (unless the UML kernel is used) that the TST_EVM_CHANGE_MODE
> > > environment variable is set to 1, so that users acknowledge that they are
> > > initializing EVM with a well-known HMAC key, which can introduce obvious
> > > security concerns.
> > > 
> > > Finally, enable SELinux, the EVM additional xattrs, and encrypted keys with
> > > user-decrypted data in the kernel configuration for CI, and set
> > > TST_EVM_CHANGE_MODE to 1 in the Github Action workflow.
> > > 
> > > Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
> > 
> > The simple SELinux and Smack tests are working properly without kernel
> > changes.  Even the Smack transmute test is working is proplery
> > returning an error message, but is followed by a kernel panic.
> > 
> > Possibly missing patches:
> >  - smack: Set the SMACK64TRANSMUTE xattr in smack_inode_init_security
> 
> Hi Mimi
> 
> that means that the test is failing.
> 
> A UML kernel panic is used to signal to the caller that a test in that
> environment failed.

Thank you for the clarification.  That explains why I couldn't
reproduce it locally.  Including a traceback like this though is kind
of ugly.

-- 
thanks,

Mimi


      reply	other threads:[~2023-06-23 14:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 19:23 [PATCH v3 ima-evm-utils 0/4] Simple EVM HMAC calculation tests Roberto Sassu
2023-06-16 19:23 ` [PATCH v3 ima-evm-utils 1/4] Include the filesystem UUID in HMAC calculation Roberto Sassu
2023-06-19 15:51   ` Stefan Berger
2023-06-16 19:23 ` [PATCH v3 ima-evm-utils 2/4] Restore correct HMAC calculation for directories Roberto Sassu
2023-06-19 15:54   ` Stefan Berger
2023-06-19 15:59     ` Roberto Sassu
2023-06-16 19:23 ` [PATCH v3 ima-evm-utils 3/4] Add --hmackey option for evmctl Roberto Sassu
2023-06-19 15:59   ` Stefan Berger
2023-06-16 19:23 ` [PATCH v3 ima-evm-utils 4/4] Add simple tests to check EVM HMAC calculation Roberto Sassu
2023-06-23 11:42   ` Mimi Zohar
2023-06-23 11:45     ` Roberto Sassu
2023-06-23 14:30       ` Mimi Zohar [this message]

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=06d377cb2be8a23140c9f78c2d4dbf1bbcbef692.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=casey@schaufler-ca.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=pvorel@suse.cz \
    --cc=roberto.sassu@huawei.com \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=stefanb@linux.ibm.com \
    --cc=vt@altlinux.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.