mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-15 19:55:32 +00:00
apparmor: fix overlapping attachment computation
commit2504db2071
upstream. When finding the profile via patterned attachments, the longest left match is being set to the static compile time value and not using the runtime computed value. Fix this by setting the candidate value to the greater of the precomputed value or runtime computed value. Fixes:21f6066105
("apparmor: improve overlapping domain attachment resolution") Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fd0953c285
commit
3c1d209120
2 changed files with 2 additions and 2 deletions
|
@ -467,7 +467,7 @@ restart:
|
|||
* xattrs, or a longer match
|
||||
*/
|
||||
candidate = profile;
|
||||
candidate_len = profile->xmatch_len;
|
||||
candidate_len = max(count, profile->xmatch_len);
|
||||
candidate_xattrs = ret;
|
||||
conflict = false;
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ struct aa_profile {
|
|||
|
||||
const char *attach;
|
||||
struct aa_dfa *xmatch;
|
||||
int xmatch_len;
|
||||
unsigned int xmatch_len;
|
||||
enum audit_mode audit;
|
||||
long mode;
|
||||
u32 path_flags;
|
||||
|
|
Loading…
Add table
Reference in a new issue