diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2016-05-20 16:42:21 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2016-06-23 16:41:56 -0400 |
commit | 3ee690143c3c99f6c0e83f08ff17556890bc6027 (patch) | |
tree | 6d2d85666a62c90af50e1c7a765fc3315464fce3 | |
parent | 29a517c232d21a717aecea29838aeb07131f6196 (diff) |
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>
-rw-r--r-- | ipc/mqueue.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
307 | struct inode *inode; | 307 | struct inode *inode; |
308 | struct ipc_namespace *ns = sb->s_fs_info; | 308 | struct ipc_namespace *ns = sb->s_fs_info; |
309 | 309 | ||
310 | sb->s_iflags |= SB_I_NOEXEC; | ||
310 | sb->s_blocksize = PAGE_SIZE; | 311 | sb->s_blocksize = PAGE_SIZE; |
311 | sb->s_blocksize_bits = PAGE_SHIFT; | 312 | sb->s_blocksize_bits = PAGE_SHIFT; |
312 | sb->s_magic = MQUEUE_MAGIC; | 313 | sb->s_magic = MQUEUE_MAGIC; |