[PATCH v2 2/2] apparmor: mediate file-generated signals
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Nov 23 12:23:20 UTC 2026
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 at 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
More information about the Linux-security-module-archive
mailing list