Patch "apparmor: fix regression in mount mediation when feature set is pinned" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
apparmor: fix regression in mount mediation when feature set is pinned
to the 4.14-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-regression-in-mount-mediation-when-feature-set-is-pinned.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
5b9f57cf47b87f07210875d6a24776b4496b818dMon Sep 17 00:00:00 2001
From: John Johansen <[email protected]>
Date: Thu, 7 Dec 2017 00:28:27 -0800
Subject: apparmor: fix regression in mount mediation when feature set is pinned
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: John Johansen <[email protected]>
commit 5b9f57cf47b87f07210875d6a24776b4496b818d upstream.
When the mount code was refactored for Labels it was not correctly updated to check whether policy supported mediation of the mount class. This causes a regression when the kernel feature set is reported as supporting mount and policy is pinned to a feature set that does not support mount mediation.
--- security/apparmor/mount.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
security/apparmor/mount.c +11 -1
@@ -330,6 +330,9 @@ static int match_mnt_path_str(struct aa_AA_BUG (!mntpath);AA_BUG (!buffer); +if (!PROFILE_MEDIATES (profile,AA_CLASS_MOUNT )) +return 0 ; + error =aa_path_name (mntpath,path_flags (profile, mntpath), buffer, &mntpnt, &info, profile->disconnected);if (error)
@@ -381,6 +384,9 @@ static int match_mnt(struct aa_profile *AA_BUG (!profile);AA_BUG (devpath && !devbuffer); +if (!PROFILE_MEDIATES (profile,AA_CLASS_MOUNT )) +return 0 ; +if (devpath) { error = aa_path_name(devpath, path_flags(profile, devpath), devbuffer, &devname, &info,
@@ -559,6 +565,9 @@ static int profile_umount(struct aa_profAA_BUG (!profile);AA_BUG (!path); +if (!PROFILE_MEDIATES (profile,AA_CLASS_MOUNT )) +return 0 ; + error =aa_path_name (path,path_flags (profile, path), buffer, &name, &info, profile->disconnected);if (error)
@@ -614,7 +623,8 @@ static struct aa_label *build_pivotroot(AA_BUG (!new_path);AA_BUG (!old_path); -if (profile_unconfined (profile)) +if (profile_unconfined (profile) || + !PROFILE_MEDIATES (profile,AA_CLASS_MOUNT ))return aa_get_newest_label (&profile->label); error = aa_path_name(old_path, path_flags(profile, old_path),
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/apparmor-fix-regression-in-mount-mediation-when-feature-set-is-pinned.patch