From: Mimi Zohar <zohar@linux.ibm.com>
To: "Guozihua (Scott)" <guozihua@huawei.com>,
dmitry.kasatkin@gmail.com, paul@paul-moore.com,
jmorris@namei.org, serge@hallyn.com
Cc: linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
Janne Karhunen <janne.karhunen@gmail.com>
Subject: Re: [PATCH v5 2/2] ima: Handle -ESTALE returned by ima_filter_rule_match()
Date: Wed, 28 Sep 2022 10:11:43 -0400 [thread overview]
Message-ID: <5e304b17fe709d2b2f30b991d5ffc4711d27a075.camel@linux.ibm.com> (raw)
In-Reply-To: <7ac3e330-e77c-95d8-7d3b-29e243b57251@huawei.com>
On Sat, 2022-09-24 at 14:05 +0800, Guozihua (Scott) wrote:
> I might have overlooked something, but if I understands the code
> correctly, we would be copying the same rule over and over again till
> the loop ends in that case. ima_lsm_update_rule() would replace the rule
> node on the rule list without updating the rule in place. Although
> synchronize_rcu() should prevent a UAF, the rule in ima_match_rules()
> would not be updated. Meaning SELinux would always return -ESTALE before
> we copy and retry as we keep passing in the outdated rule entry.
After reviewing this patch set again, the code looks fine. The commit
message is still a bit off, but I've pushed the patch set out to next-
integrity-testing, waiting for some Reviewed-by/Tested-by tags.
--
thanks,
Mimi
next prev parent reply other threads:[~2022-09-28 14:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 12:58 [PATCH v5 0/2] ima: Handle -ESTALE returned by ima_filter_rule_match() GUO Zihua
2022-09-21 12:58 ` [PATCH v5 1/2] ima: Simplify ima_lsm_copy_rule GUO Zihua
2022-09-21 12:58 ` [PATCH v5 2/2] ima: Handle -ESTALE returned by ima_filter_rule_match() GUO Zihua
2022-09-22 11:09 ` Mimi Zohar
2022-09-23 4:01 ` Guozihua (Scott)
2022-09-23 11:19 ` Mimi Zohar
2022-09-24 6:05 ` Guozihua (Scott)
2022-09-28 14:11 ` Mimi Zohar [this message]
2022-10-04 14:19 ` Roberto Sassu
2022-10-18 8:43 ` Guozihua (Scott)
2022-10-19 1:07 ` Mimi Zohar
2022-10-19 7:17 ` Guozihua (Scott)
2022-10-28 8:36 ` Guozihua (Scott)
2022-11-01 22:15 ` Mimi Zohar
2022-11-02 1:42 ` Guozihua (Scott)
2022-11-03 13:15 ` Mimi Zohar
2022-11-14 3:31 ` Guozihua (Scott)
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=5e304b17fe709d2b2f30b991d5ffc4711d27a075.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=guozihua@huawei.com \
--cc=janne.karhunen@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.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).