Patch "apparmor: fix ptrace label match when matching stacked labels" 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 ptrace label match when matching stacked labels
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-ptrace-label-match-when-matching-stacked-labels.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
0dda0b3fb255048a221f736c8a2a24c674da8bf3Mon Sep 17 00:00:00 2001
From: John Johansen <[email protected]>
Date: Fri, 8 Dec 2017 17:43:18 -0800
Subject: apparmor: fix ptrace label match when matching stacked labels
From: John Johansen <[email protected]>
commit 0dda0b3fb255048a221f736c8a2a24c674da8bf3 upstream.
Given a label with a profile stack of
A//&B or A//&C ...
A ptrace rule should be able to specify a generic trace pattern with a rule like
ptrace trace A//&**,
however this is failing because while the correct label match routine is called, it is being done post label decomposition so it is always being done against a profile instead of the stacked label.
To fix this refactor the cross check to pass the full peer label in to the label_match.
--- security/apparmor/include/perms.h | 3 ++ security/apparmor/ipc.c | 53 ++++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 21 deletions(-)
security/apparmor/include/perms.h +3 -0
@@ -133,6 +133,9 @@ extern struct aa_perms allperms; #define xcheck_labels_profiles(L1, L2, FN, args...) \ xcheck_ns_labels((L1), (L2), xcheck_ns_profile_label, (FN), args) +#define xcheck_labels (L1 ,L2 ,P ,FN1 ,FN2 ) \ + xcheck(fn_for_each((L1), (P), (FN1)), fn_for_each((L2), (P), (FN2))) +void aa_perm_mask_to_str (char *str,const char *chrs,u32 mask);void aa_audit_perm_names (struct audit_buffer *ab,const char **names,u32 mask);
security/apparmor/ipc.c +32 -21
82 lines not on this page · raw message
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/apparmor-fix-ptrace-label-match-when-matching-stacked-labels.patch