From: Eric W. Biederman Date: Fri, 20 May 2016 20:42:21 +0000 (-0500) Subject: ipc/mqueue: The mqueue filesystem should never contain executables X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3ee690143c3c99f6c0e83f08ff17556890bc6027;p=openwrt%2Fstaging%2Fblogic.git ipc/mqueue: The mqueue filesystem should never contain executables Set SB_I_NOEXEC on mqueuefs to ensure small implementation mistakes do not result in executable on mqueuefs by accident. Acked-by: Seth Forshee Signed-off-by: "Eric W. Biederman" --- diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 60d97082f4dc..5bdd50de7d05 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -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;