From: John Johansen <john.johansen@canonical.com>
To: Paul Moore <paul@paul-moore.com>, linux-security-module@vger.kernel.org
Subject: Re: [PATCH] apparmor: leverage audit_log_n_untrustedstring() when possible
Date: Mon, 20 Jul 2026 18:41:00 -0700 [thread overview]
Message-ID: <326a6ffc-8cb1-4842-8bf0-74dd58bfdf08@canonical.com> (raw)
In-Reply-To: <20260717215254.383183-2-paul@paul-moore.com>
On 7/17/26 14:52, Paul Moore wrote:
> Make use of the audit_log_n_untrustedstring() function to simplify the
> code in aa_label_xaudit().
>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
Acked-by: John Johansen <john.johansen@canonical.com>
unless you object I will pull this into the apparmor tree
> ---
> security/apparmor/label.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/security/apparmor/label.c b/security/apparmor/label.c
> index 3fd384d8c41a..a165cadf8249 100644
> --- a/security/apparmor/label.c
> +++ b/security/apparmor/label.c
> @@ -1743,10 +1743,7 @@ void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns,
> str = (char *) label->hname;
> len = strlen(str);
> }
> - if (audit_string_contains_control(str, len))
> - audit_log_n_hex(ab, str, len);
> - else
> - audit_log_n_string(ab, str, len);
> + audit_log_n_untrustedstring(ab, str, len);
>
> kfree(name);
> }
next prev parent reply other threads:[~2026-07-21 1:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 21:52 [PATCH] apparmor: leverage audit_log_n_untrustedstring() when possible Paul Moore
2026-07-17 21:54 ` Paul Moore
2026-07-17 21:57 ` Paul Moore
2026-07-17 23:52 ` Ryan Lee
2026-07-21 1:41 ` John Johansen [this message]
2026-07-21 1:53 ` Paul Moore
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=326a6ffc-8cb1-4842-8bf0-74dd58bfdf08@canonical.com \
--to=john.johansen@canonical.com \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.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