aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/security/apparmor/include/task.h
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2022-09-09 16:00:09 -0700
committerJohn Johansen <john.johansen@canonical.com>2023-10-18 15:49:02 -0700
commitfa9b63adabcfa9b724120ef3352cf6fb82b4b9a5 (patch)
treedc093ea12c7ae548e981bc1f675d7f974a6366f0 /security/apparmor/include/task.h
parentapparmor: allow restricting unprivileged change_profile (diff)
downloadwireguard-linux-fa9b63adabcfa9b724120ef3352cf6fb82b4b9a5.tar.xz
wireguard-linux-fa9b63adabcfa9b724120ef3352cf6fb82b4b9a5.zip
apparmor: add user namespace creation mediation
Unprivileged user namespace creation is often used as a first step in privilege escalation attacks. Instead of disabling it at the sysrq level, which blocks its legitimate use as for setting up a sandbox, allow control on a per domain basis. This allows an admin to quickly lock down a system while also still allowing legitimate use. Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/task.h')
-rw-r--r--security/apparmor/include/task.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/security/apparmor/include/task.h b/security/apparmor/include/task.h
index 13945e2495f0..b1aaaf60fa8b 100644
--- a/security/apparmor/include/task.h
+++ b/security/apparmor/include/task.h
@@ -96,4 +96,10 @@ int aa_may_ptrace(const struct cred *tracer_cred, struct aa_label *tracer,
u32 request);
+
+#define AA_USERNS_CREATE 8
+
+int aa_profile_ns_perm(struct aa_profile *profile,
+ struct apparmor_audit_data *ad, u32 request);
+
#endif /* __AA_TASK_H */