]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
(namespace) ipc/mqueue: The mqueue filesystem should never contain executables
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 20 May 2016 20:42:21 +0000 (15:42 -0500)
committerKamal Mostafa <kamal@canonical.com>
Tue, 28 Jun 2016 17:45:08 +0000 (10:45 -0700)
BugLink: http://bugs.launchpad.net/bugs/1588056
Set SB_I_NOEXEC on mqueuefs to ensure small implementation mistakes
do not result in executable on mqueuefs by accident.

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
(backported from linux-next commit 3ee690143c3c99f6c0e83f08ff17556890bc6027)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
ipc/mqueue.c

index 00df08df0d2e833c3ab6348079f2cd2d9d07c48c..f490ffb07b6dd6df3a0138915c2b5de13adb256b 100644 (file)
@@ -307,6 +307,7 @@ static int mqueue_fill_super(struct super_block *sb, void *data, int silent)
        struct inode *inode;
        struct ipc_namespace *ns = sb->s_fs_info;
 
+       sb->s_iflags |= SB_I_NOEXEC;
        sb->s_blocksize = PAGE_CACHE_SIZE;
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
        sb->s_magic = MQUEUE_MAGIC;