diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-15 14:53:08 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-15 14:53:08 -0800 |
commit | 033c40a89f55525139fd5b6342281b09b97d05bf (patch) | |
tree | 4fb64e1c9a780dc4ed511275736fc7ec6c84e46f | |
parent | 3402351a5a8f3bcb1488877f85072a0141c97939 (diff) | |
parent | cbb13e12a5d3ecef400716ea7d12a9268b0f37ca (diff) |
Merge tag 'apparmor-v6.2-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
Pull apparmor fix from John Johansen:
"Regression fix for getattr mediation of old policy"
* tag 'apparmor-v6.2-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
apparmor: Fix regression in compat permissions for getattr
-rw-r--r-- | security/apparmor/policy_compat.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/apparmor/policy_compat.c b/security/apparmor/policy_compat.c index 9e52e218bf30..cc89d1e88fb7 100644 --- a/security/apparmor/policy_compat.c +++ b/security/apparmor/policy_compat.c @@ -160,8 +160,7 @@ static struct aa_perms *compute_fperms(struct aa_dfa *dfa) if (!table) return NULL; - /* zero init so skip the trap state (state == 0) */ - for (state = 1; state < state_count; state++) { + for (state = 0; state < state_count; state++) { table[state * 2] = compute_fperms_user(dfa, state); table[state * 2 + 1] = compute_fperms_other(dfa, state); } |