summaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2016-05-20 15:42:21 -0500
committerEric W. Biederman <ebiederm@xmission.com>2016-06-23 15:41:56 -0500
commit3ee690143c3c99f6c0e83f08ff17556890bc6027 (patch)
tree6d2d85666a62c90af50e1c7a765fc3315464fce3 /ipc/mqueue.c
parent29a517c232d21a717aecea29838aeb07131f6196 (diff)
downloadop-kernel-dev-3ee690143c3c99f6c0e83f08ff17556890bc6027.zip
op-kernel-dev-3ee690143c3c99f6c0e83f08ff17556890bc6027.tar.gz
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 <seth.forshee@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 60d9708..5bdd50d 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;
OpenPOWER on IntegriCloud