Skip to content

Commit

Permalink
ipc/mqueue: The mqueue filesystem should never contain executables
Browse files Browse the repository at this point in the history
Set SB_I_NOEXEC on mqueuefs to ensure small implementation mistakes
do not result in executable on mqueuefs by accident.

Acked-by: Seth Forshee <[email protected]>
Signed-off-by: "Eric W. Biederman" <[email protected]>
  • Loading branch information
ebiederm committed Jun 23, 2016
1 parent 29a517c commit 3ee6901
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3ee6901

Please sign in to comment.