All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: "linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	linux-audit@redhat.com, Mimi Zohar <zohar@linux.ibm.com>
Cc: "dmitry.kasatkin@gmail.com" <dmitry.kasatkin@gmail.com>,
	BARVAUX Didier <Didier.BARVAUX@viveris.fr>,
	THOBY Simon <Simon.THOBY@viveris.fr>
Subject: Re: [PATCH v7 0/5] IMA: restrict the accepted digest algorithms for the security.ima xattr
Date: Wed, 11 Aug 2021 19:53:15 -0400	[thread overview]
Message-ID: <2072391.irdbgypaU6@x2> (raw)
In-Reply-To: <f06d6b278bf228d21bf3ec01da8173e6518557f9.camel@linux.ibm.com>

Hello,

On Wednesday, August 11, 2021 3:40:51 PM EDT Mimi Zohar wrote:
> On Wed, 2021-08-11 at 11:40 +0000, THOBY Simon wrote:
> Other than the two questions on " IMA: add a policy option to restrict
> xattr hash algorithms on appraisal" patch, the patch set is looking
> good.
> 
> thanks,
> 
> Mimi
> 
> > Here is also a short description of the new audit messages, but I can
> > send it in a followup mail if that is not the proper place:
> > 
> > When writing the xattr with an algorithm not built in the kernel (here
> > the
> > kernel was built with CONFIG_CRYPTO_MD5 unset), e.g. with
> > 
> > "evmctl ima_hash -a md5 /usr/bin/strace":
> > 	audit(1628066120.418:121): pid=1344 uid=0 auid=0 ses=1
> > 	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 op=set_data
> > 	cause=unavailable-hash-algorithm comm="evmctl" name="/usr/bin/strace"
> > 	dev="dm-0" ino=2632657 res=0 errno=0> 

Is this audit event accurate? I seem to be seeing name=value=value. I'm 
hoping this is a copy/paste/mail client issue.

-Steve


> > With the same command and the policy rule
> > 
> > "appraise func=SETXATTR_CHECK appraise_algos=sha256,sha384,sha512", we 
get:
> > 	audit(1628066210.141:127): pid=1362 uid=0 auid=0 ses=1
> > 	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 op=set_data
> > 	cause=denied-hash-algorithm comm="evmctl" name="/usr/bin/strace"
> > 	dev="dm-0" ino=2632657 res=0 errno=0> 
> > Note that the cause is now 'denied-hash-algorithm' instead of
> > 'unavailable-hash-algorithm'. We get that audit message for any algorithm
> > outside of sha256/384/512 (including algorithms not compiled in the
> > kernel
> > like MD5). In a sense, 'denied-hash-algorithm' takes predecence over
> > 'unavailable-hash-algorithm'.
> > 
> > When appraising files, e.g. trying to execute a file whose xattr was
> > hashed with sha1 while the policy rule
> > 
> > "appraise func=BPRM_CHECK fowner=0 appraise_algos=sha256" is enabled:
> > 	audit(1628066349.230:130): pid=1369 uid=0 auid=0 ses=1
> > 	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> > 	op=collect_data cause=denied-hash-algorithm comm="bash"
> > 	name="/usr/bin/strace" dev="dm-0" ino=2632657 res=0 errno=0> 
> > This series is based on the following repo/branch:
> >  repo:
> >  https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.g
> >  it branch: next-integrity-testing
> >  commit e37be5343ae2b9419aea1442b07e5d2428b437b4 ("Merge branch
> >  'ima-buffer-measurement-changes-v4' into next-integrity")
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://listman.redhat.com/mailman/listinfo/linux-audit




--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


WARNING: multiple messages have this Message-ID (diff)
From: Steve Grubb <sgrubb@redhat.com>
To: "linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	linux-audit@redhat.com, Mimi Zohar <zohar@linux.ibm.com>
Cc: THOBY Simon <Simon.THOBY@viveris.fr>,
	"dmitry.kasatkin@gmail.com" <dmitry.kasatkin@gmail.com>,
	BARVAUX Didier <Didier.BARVAUX@viveris.fr>
Subject: Re: [PATCH v7 0/5] IMA: restrict the accepted digest algorithms for the security.ima xattr
Date: Wed, 11 Aug 2021 19:53:15 -0400	[thread overview]
Message-ID: <2072391.irdbgypaU6@x2> (raw)
In-Reply-To: <f06d6b278bf228d21bf3ec01da8173e6518557f9.camel@linux.ibm.com>

Hello,

On Wednesday, August 11, 2021 3:40:51 PM EDT Mimi Zohar wrote:
> On Wed, 2021-08-11 at 11:40 +0000, THOBY Simon wrote:
> Other than the two questions on " IMA: add a policy option to restrict
> xattr hash algorithms on appraisal" patch, the patch set is looking
> good.
> 
> thanks,
> 
> Mimi
> 
> > Here is also a short description of the new audit messages, but I can
> > send it in a followup mail if that is not the proper place:
> > 
> > When writing the xattr with an algorithm not built in the kernel (here
> > the
> > kernel was built with CONFIG_CRYPTO_MD5 unset), e.g. with
> > 
> > "evmctl ima_hash -a md5 /usr/bin/strace":
> > 	audit(1628066120.418:121): pid=1344 uid=0 auid=0 ses=1
> > 	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 op=set_data
> > 	cause=unavailable-hash-algorithm comm="evmctl" name="/usr/bin/strace"
> > 	dev="dm-0" ino=2632657 res=0 errno=0> 

Is this audit event accurate? I seem to be seeing name=value=value. I'm 
hoping this is a copy/paste/mail client issue.

-Steve


> > With the same command and the policy rule
> > 
> > "appraise func=SETXATTR_CHECK appraise_algos=sha256,sha384,sha512", we 
get:
> > 	audit(1628066210.141:127): pid=1362 uid=0 auid=0 ses=1
> > 	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 op=set_data
> > 	cause=denied-hash-algorithm comm="evmctl" name="/usr/bin/strace"
> > 	dev="dm-0" ino=2632657 res=0 errno=0> 
> > Note that the cause is now 'denied-hash-algorithm' instead of
> > 'unavailable-hash-algorithm'. We get that audit message for any algorithm
> > outside of sha256/384/512 (including algorithms not compiled in the
> > kernel
> > like MD5). In a sense, 'denied-hash-algorithm' takes predecence over
> > 'unavailable-hash-algorithm'.
> > 
> > When appraising files, e.g. trying to execute a file whose xattr was
> > hashed with sha1 while the policy rule
> > 
> > "appraise func=BPRM_CHECK fowner=0 appraise_algos=sha256" is enabled:
> > 	audit(1628066349.230:130): pid=1369 uid=0 auid=0 ses=1
> > 	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> > 	op=collect_data cause=denied-hash-algorithm comm="bash"
> > 	name="/usr/bin/strace" dev="dm-0" ino=2632657 res=0 errno=0> 
> > This series is based on the following repo/branch:
> >  repo:
> >  https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.g
> >  it branch: next-integrity-testing
> >  commit e37be5343ae2b9419aea1442b07e5d2428b437b4 ("Merge branch
> >  'ima-buffer-measurement-changes-v4' into next-integrity")
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://listman.redhat.com/mailman/listinfo/linux-audit





  reply	other threads:[~2021-08-11 23:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 11:40 [PATCH v7 0/5] IMA: restrict the accepted digest algorithms for the security.ima xattr THOBY Simon
2021-08-11 11:40 ` [PATCH v7 1/5] IMA: remove the dependency on CRYPTO_MD5 THOBY Simon
2021-08-11 11:40 ` [PATCH v7 2/5] IMA: block writes of the security.ima xattr with unsupported algorithms THOBY Simon
2021-08-11 11:40 ` [PATCH v7 3/5] IMA: add support to restrict the hash algorithms used for file appraisal THOBY Simon
2021-08-11 11:40 ` [PATCH v7 5/5] IMA: introduce a new policy option func=SETXATTR_CHECK THOBY Simon
2021-08-11 11:40 ` [PATCH v7 4/5] IMA: add a policy option to restrict xattr hash algorithms on appraisal THOBY Simon
2021-08-11 16:26   ` Mimi Zohar
2021-08-12  8:06     ` THOBY Simon
2021-08-12 13:16       ` Mimi Zohar
2021-08-12 18:31         ` Mimi Zohar
2021-08-13  7:17           ` THOBY Simon
2021-08-13 12:49             ` Mimi Zohar
2021-08-11 19:40 ` [PATCH v7 0/5] IMA: restrict the accepted digest algorithms for the security.ima xattr Mimi Zohar
2021-08-11 19:40   ` Mimi Zohar
2021-08-11 23:53   ` Steve Grubb [this message]
2021-08-11 23:53     ` Steve Grubb
2021-08-12  0:17     ` Steve Grubb
2021-08-12  0:17       ` Steve Grubb

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=2072391.irdbgypaU6@x2 \
    --to=sgrubb@redhat.com \
    --cc=Didier.BARVAUX@viveris.fr \
    --cc=Simon.THOBY@viveris.fr \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-integrity@vger.kernel.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 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.