]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
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)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 23 Jun 2016 20:41:56 +0000 (15:41 -0500)
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>
ipc/mqueue.c

index 60d97082f4dcff0424a4f2a8c3d12890480ae4d2..5bdd50de7d058abdf4ed4946a0f52fc7e43bc60c 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_SIZE;
        sb->s_blocksize_bits = PAGE_SHIFT;
        sb->s_magic = MQUEUE_MAGIC;