This is a note to let you know that I've just added the patch titled apparmor: Fix failed mount permission check error message to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: apparmor-fix-failed-mount-permission-check-error-message.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ec240b5905bbb09a03dccffee03062cf39e38dc2 Mon Sep 17 00:00:00 2001 From: John Johansen <john.johansen@xxxxxxxxxxxxx> Date: Tue, 25 Jan 2022 00:37:42 -0800 Subject: apparmor: Fix failed mount permission check error message From: John Johansen <john.johansen@xxxxxxxxxxxxx> commit ec240b5905bbb09a03dccffee03062cf39e38dc2 upstream. When the mount check fails due to a permission check failure instead of explicitly at one of the subcomponent checks, AppArmor is reporting a failure in the flags match. However this is not true and AppArmor can not attribute the error at this point to any particular component, and should only indicate the mount failed due to missing permissions. Fixes: 2ea3ffb7782a ("apparmor: add mount mediation") Signed-off-by: John Johansen <john.johansen@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- security/apparmor/mount.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/security/apparmor/mount.c +++ b/security/apparmor/mount.c @@ -229,7 +229,8 @@ static const char * const mnt_info_table "failed srcname match", "failed type match", "failed flags match", - "failed data match" + "failed data match", + "failed perms check" }; /* @@ -284,8 +285,8 @@ static int do_match_mnt(struct aa_dfa *d return 0; } - /* failed at end of flags match */ - return 4; + /* failed at perms check, don't confuse with flags match */ + return 6; } Patches currently in stable-queue which might be from john.johansen@xxxxxxxxxxxxx are queue-5.15/apparmor-fix-absroot-causing-audited-secids-to-begin-with.patch queue-5.15/apparmor-fix-memleak-in-aa_simple_write_to_buffer.patch queue-5.15/apparmor-fix-setting-unconfined-mode-on-a-loaded-profile.patch queue-5.15/apparmor-fix-quiet_denied-for-file-rules.patch queue-5.15/apparmor-fix-aa_label_asxprint-return-check.patch queue-5.15/apparmor-fix-overlapping-attachment-computation.patch queue-5.15/apparmor-fix-reference-count-leak-in-aa_pivotroot.patch queue-5.15/apparmor-fix-failed-mount-permission-check-error-message.patch