From: Roberto Sassu <roberto.sassu@huawei.com>
To: Casey Schaufler <casey@schaufler-ca.com>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>
Cc: "linux-security-module@vger.kernel.org"
<linux-security-module@vger.kernel.org>,
"zohar@linux.ibm.com" <zohar@linux.ibm.com>,
Dmitry Kasatkin <dmitry.kasatkin@huawei.com>,
"Silviu Vlasceanu" <Silviu.Vlasceanu@huawei.com>
Subject: RE: [WIP][RFC][PATCH 1/3] security: introduce call_int_hook_and() macro
Date: Thu, 29 Aug 2019 14:29:22 +0000 [thread overview]
Message-ID: <55aad0d1c30f455ca34229ee71855d20@huawei.com> (raw)
In-Reply-To: <4c13c8a7-e255-a3a8-c19a-cae85a71cae9@schaufler-ca.com>
> -----Original Message-----
> From: Casey Schaufler [mailto:casey@schaufler-ca.com]
> Sent: Monday, August 19, 2019 4:52 PM
> To: Roberto Sassu <roberto.sassu@huawei.com>; linux-
> integrity@vger.kernel.org
> Cc: linux-security-module@vger.kernel.org; zohar@linux.ibm.com; Dmitry
> Kasatkin <dmitry.kasatkin@huawei.com>; Silviu Vlasceanu
> <Silviu.Vlasceanu@huawei.com>
> Subject: Re: [WIP][RFC][PATCH 1/3] security: introduce call_int_hook_and()
> macro
>
> On 8/18/2019 4:57 PM, Roberto Sassu wrote:
> > The LSM hooks audit_rule_known() and audit_rule_match() define 1 as
> > result for successful operation. However, the security_ functions use
> > call_int_hook() which stops iterating over LSMs if the result is not
> > zero.
> >
> > Introduce call_int_hook_and(), so that the final result returned by
> > the security_ functions is 1 if all LSMs return 1.
>
> I don't think this is what you want. You want an audit record generated if
> any of the security modules want one, not only if all of the security modules
> want one.
Right, it would be better if I can specify the prefix of the LSM that should
execute the audit_rule_match() hook.
For example, I would like to specify in the IMA policy:
measure subj_type=infoflow:tcb
'infoflow:tcb' would be the value of the 'lsmrule' parameter of
security_audit_rule_match().
The rule would be evaluated only by Infoflow LSM, and not SELinux.
Roberto
next prev parent reply other threads:[~2019-08-29 14:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-18 23:57 [WIP][RFC][PATCH 0/3] Introduce Infoflow LSM Roberto Sassu
2019-08-18 23:57 ` [WIP][RFC][PATCH 1/3] security: introduce call_int_hook_and() macro Roberto Sassu
2019-08-19 14:52 ` Casey Schaufler
2019-08-29 14:29 ` Roberto Sassu [this message]
2019-08-18 23:57 ` [WIP][RFC][PATCH 2/3] lsm notifier: distinguish between state change and policy change Roberto Sassu
2019-08-18 23:57 ` [WIP][RFC][PATCH 3/3] security: add infoflow LSM Roberto Sassu
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=55aad0d1c30f455ca34229ee71855d20@huawei.com \
--to=roberto.sassu@huawei.com \
--cc=Silviu.Vlasceanu@huawei.com \
--cc=casey@schaufler-ca.com \
--cc=dmitry.kasatkin@huawei.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-security-module@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 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).