From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2 2/2] apparmor: mediate file-generated signals
Date: Mon, 23 Nov 2026 12:23:20 +0000 [thread overview]
Message-ID: <sashiko-outbox-229208@kernel.org> (raw)
In-Reply-To: <CA5F08835E9B673D+4c9dbc21026e6b6ad4acb1f90255da95c3bbc0b1.1795434950.git.shilc2025@mail.sustech.edu.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] apparmor: nonexistent fown->cred access in
apparmor_file_send_sigiotask()
--
commit adb1f63ac0d010cf15636cb43e53dd9299246228
Author: Shi Lecun <shilc2025@mail.sustech.edu.cn>
apparmor: mediate file-generated signals
This commit adds a file_send_sigiotask hook to AppArmor to mediate
file-generated SIGIO and SIGURG notifications.
Link: https://lore.kernel.org/all/20261120-unrentabel-bambus-genuss-0db3576a8f57@brauner/
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index d502ad0ac26f5..1a6e49bd50311 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
[ ... ]
> @@ -1047,6 +1044,13 @@ static int apparmor_task_kill(struct task_struct *target, struct kernel_siginfo
> return error;
> }
>
> +static int apparmor_file_send_sigiotask(struct task_struct *target,
> + struct fown_struct *fown, int sig)
> +{
> + lockdep_assert_held(&fown->lock);
> + return apparmor_task_kill(target, NULL, sig ? sig : SIGIO, fown->cred);
> +}
[Severity: High]
Does this compile when CONFIG_SECURITY_APPARMOR is enabled?
struct fown_struct has no cred member; __f_setown() only records uid and
euid on f_owner and calls security_file_set_fowner(filp) so LSMs can store
the file owner context in their file security blob via fown->file.
--
Sashiko AI review · https://sashiko.dev/#/patchset/54EBCABD3ACBF0A5+9d780112081161e2f99fe501c2c38f1614a68a42.1795434950.git.shilc2025@mail.sustech.edu.cn?part=2
prev parent reply other threads:[~2026-11-23 12:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1795434950.git.shilc2025@mail.sustech.edu.cn>
2026-11-23 12:13 ` [PATCH v2 1/2] fcntl: recheck signal permissions before falling back to SIGIO Shi Lecun
2026-11-23 12:23 ` sashiko-bot
2026-12-01 13:01 ` Christian Brauner
2026-11-23 12:13 ` [PATCH v2 2/2] apparmor: mediate file-generated signals Shi Lecun
2026-11-23 12:23 ` sashiko-bot [this message]
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=sashiko-outbox-229208@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.