summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2017-01-16 00:42:43 -0800
committerBen Hutchings <ben@decadent.org.uk>2019-05-02 21:42:07 +0100
commita62ea6707949c2a49f8a4f62c5b5d4c1703451d3 (patch)
treee155478b358afd73d635176a545d61bcbf0ba21d /security
parent1e06334afa7199cc86c6c4830b71a7c1ea8e7901 (diff)
downloadlinux-stable-a62ea6707949c2a49f8a4f62c5b5d4c1703451d3.tar.gz
linux-stable-a62ea6707949c2a49f8a4f62c5b5d4c1703451d3.tar.bz2
linux-stable-a62ea6707949c2a49f8a4f62c5b5d4c1703451d3.zip
apparmor: provide userspace flag indicating binfmt_elf_mmap change
commit 34c426acb75cc21bdf84685e106db0c1a3565057 upstream. Commit 9f834ec18def ("binfmt_elf: switch to new creds when switching to new mm") changed when the creds are installed by the binfmt_elf handler. This affects which creds are used to mmap the executable into the address space. Which can have an affect on apparmor policy. Add a flag to apparmor at /sys/kernel/security/apparmor/features/domain/fix_binfmt_elf_mmap to make it possible to detect this semantic change so that the userspace tools and the regression test suite can correctly deal with the change. BugLink: http://bugs.launchpad.net/bugs/1630069 Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/apparmorfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 7db9954f1af2..885804062795 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -794,6 +794,7 @@ static struct aa_fs_entry aa_fs_entry_domain[] = {
AA_FS_FILE_BOOLEAN("change_hatv", 1),
AA_FS_FILE_BOOLEAN("change_onexec", 1),
AA_FS_FILE_BOOLEAN("change_profile", 1),
+ AA_FS_FILE_BOOLEAN("fix_binfmt_elf_mmap", 1),
{ }
};