From: Dmitry Mastykin <dmastykin@astralinux.ru>
To: casey@schaufler-ca.com, linux-security-module@vger.kernel.org
Cc: dmastykin@astralinux.ru, akovalenko@astralinux.ru
Subject: [PATCH 3/3] kernel/auditsc: use correct blob for files in security_audit_rule_match call
Date: Fri, 6 Aug 2021 10:02:45 +0300 [thread overview]
Message-ID: <20210806070245.26338-4-dmastykin@astralinux.ru> (raw)
In-Reply-To: <20210806070245.26338-1-dmastykin@astralinux.ru>
File audit didn't work. Uninitialized local structure was passed
to security_audit_rule_match instead of audit_names oblob.
Signed-off-by: Dmitry Mastykin <dmastykin@astralinux.ru>
---
kernel/auditsc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index c314533dd220..3b1afdb5cda4 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -689,14 +689,14 @@ static int audit_filter_rules(struct task_struct *tsk,
/* Find files that match */
if (name) {
result = security_audit_rule_match(
- &blob,
+ &name->oblob,
f->type,
f->op,
f->lsm_rules);
} else if (ctx) {
list_for_each_entry(n, &ctx->names_list, list) {
if (security_audit_rule_match(
- &blob,
+ &n->oblob,
f->type,
f->op,
f->lsm_rules)) {
--
2.11.0
next prev parent reply other threads:[~2021-08-06 7:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 7:02 lsm-stacking: fix broken lsm audit Dmitry Mastykin
2021-08-06 7:02 ` [PATCH 1/3] security/security: remove extra address-of in hook.audit_rule_match call Dmitry Mastykin
2021-08-06 7:02 ` [PATCH 2/3] security/security: get rid of a duplicated condition Dmitry Mastykin
2021-08-06 7:02 ` Dmitry Mastykin [this message]
2021-08-06 20:01 ` lsm-stacking: fix broken lsm audit Casey Schaufler
2021-10-25 8:17 ` Dmitry Mastykin
2021-10-25 15:01 ` Casey Schaufler
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=20210806070245.26338-4-dmastykin@astralinux.ru \
--to=dmastykin@astralinux.ru \
--cc=akovalenko@astralinux.ru \
--cc=casey@schaufler-ca.com \
--cc=linux-security-module@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 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.