summaryrefslogtreecommitdiff
path: root/security/apparmor/policy.c
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2018-09-13 19:12:09 +0300
committerJohn Johansen <john.johansen@canonical.com>2018-09-13 19:44:56 +0300
commit1f8266ff58840d698a1e96d2274189de1bdf7969 (patch)
tree22ec503efa895edcbc8a0bdd465d4206cad19311 /security/apparmor/policy.c
parent5f997580e8b12b9f585e34cc16304925d26ce49e (diff)
downloadlinux-1f8266ff58840d698a1e96d2274189de1bdf7969.tar.xz
apparmor: don't try to replace stale label in ptrace access check
As a comment above begin_current_label_crit_section() explains, begin_current_label_crit_section() must run in sleepable context because when label_is_stale() is true, aa_replace_current_label() runs, which uses prepare_creds(), which can sleep. Until now, the ptrace access check (which runs with a task lock held) violated this rule. Also add a might_sleep() assertion to begin_current_label_crit_section(), because asserts are less likely to be ignored than comments. Fixes: b2d09ae449ced ("apparmor: move ptrace checks to using labels") Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/policy.c')
0 files changed, 0 insertions, 0 deletions