From: Mimi Zohar <zohar@linux.ibm.com>
To: THOBY Simon <Simon.THOBY@viveris.fr>,
"dmitry.kasatkin@gmail.com" <dmitry.kasatkin@gmail.com>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
BARVAUX Didier <Didier.BARVAUX@viveris.fr>
Subject: Re: [PATCH v4 4/5] IMA: add a policy option to restrict xattr hash algorithms on appraisal
Date: Tue, 27 Jul 2021 17:07:22 -0400 [thread overview]
Message-ID: <ecd666bdd278a0ca28b5fec10f4ac06932911f12.camel@linux.ibm.com> (raw)
In-Reply-To: <20210727163330.790010-5-simon.thoby@viveris.fr>
On Tue, 2021-07-27 at 16:33 +0000, THOBY Simon wrote:
> The kernel have the ability to restrict the set of hash algorithms
^kernel has
> it accepts for the security.ima xattr when it appraises files.
>
> Define a new IMA policy rule option "appraise_hash=",
> using the mentionned mechanism to expose a user-toggable policy
^mentioned
> knob to opt-in to that restriction and select the desired set of
> algorithms that must be accepted.
>
> When a policy rule uses the 'appraise_hash' option, appraisal of a
> file referenced by that rule will now fail if the digest algorithm
> employed to hash the file was not one of those explicitly listed
> in the option. In its absence, any hash algorithm compiled in the
> kernel will be accepted.
>
> For example, on a system where SELinux is properly deployed, the rule
> appraise func=BPRM_CHECK obj_type=iptables_exec_t appraise_hash=sha256,sha384
> will block the execution of iptables if the xattr security.ima of its
> executables were not hashed with either sha256 or sha384.
>
> Signed-off-by: Simon Thoby <simon.thoby@viveris.fr>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
> ---
<snip>
> @@ -1204,6 +1228,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
> entry->uid_op = &uid_eq;
> entry->fowner_op = &uid_eq;
> entry->action = UNKNOWN;
> + entry->allowed_hashes = 0;
"entry" is zeroed when allocated.
next prev parent reply other threads:[~2021-07-27 21:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 16:33 [PATCH v4 0/5] IMA: restrict the accepted digest algorithms for THOBY Simon
2021-07-27 16:33 ` [PATCH v4 1/5] IMA: remove the dependency on CRYPTO_MD5 THOBY Simon
2021-07-27 17:57 ` Mimi Zohar
2021-07-27 16:33 ` [PATCH v4 2/5] IMA: block writes of the security.ima xattr with unsupported algorithms THOBY Simon
2021-07-27 20:32 ` Mimi Zohar
2021-07-28 7:00 ` THOBY Simon
2021-07-28 12:43 ` Mimi Zohar
2021-07-28 12:53 ` THOBY Simon
2021-07-28 13:09 ` Mimi Zohar
2021-07-27 16:33 ` [PATCH v4 3/5] IMA: add support to restrict the hash algorithms used for file appraisal THOBY Simon
2021-07-27 20:38 ` Mimi Zohar
2021-07-27 16:33 ` [PATCH v4 4/5] IMA: add a policy option to restrict xattr hash algorithms on appraisal THOBY Simon
2021-07-27 21:07 ` Mimi Zohar [this message]
2021-07-27 16:33 ` [PATCH v4 5/5] IMA: introduce a new policy option func=SETXATTR_CHECK THOBY Simon
2021-07-27 17:25 ` Mimi Zohar
2021-07-27 17:58 ` THOBY Simon
2021-07-27 17:47 ` [PATCH v4 0/5] IMA: restrict the accepted digest algorithms for 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=ecd666bdd278a0ca28b5fec10f4ac06932911f12.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=Didier.BARVAUX@viveris.fr \
--cc=Simon.THOBY@viveris.fr \
--cc=dmitry.kasatkin@gmail.com \
--cc=linux-integrity@vger.kernel.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 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).