diff options
author | Valerie Aurora <vaurora@redhat.com> | 2010-08-26 11:07:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-07 13:46:20 -0700 |
commit | 7a2e8a8faab76386d8eaae9ded739ee5615be174 (patch) | |
tree | 404b9c185f32e3e6ef871bb85c217314e4aff3e8 /arch | |
parent | 2bfc96a127bc1cc94d26bfaa40159966064f9c8c (diff) | |
download | linux-stable-7a2e8a8faab76386d8eaae9ded739ee5615be174.tar.gz linux-stable-7a2e8a8faab76386d8eaae9ded739ee5615be174.tar.bz2 linux-stable-7a2e8a8faab76386d8eaae9ded739ee5615be174.zip |
VFS: Sanity check mount flags passed to change_mnt_propagation()
Sanity check the flags passed to change_mnt_propagation(). Exactly
one flag should be set. Return EINVAL otherwise.
Userspace can pass in arbitrary combinations of MS_* flags to mount().
do_change_type() is called if any of MS_SHARED, MS_PRIVATE, MS_SLAVE,
or MS_UNBINDABLE is set. do_change_type() clears MS_REC and then
calls change_mnt_propagation() with the rest of the user-supplied
flags. change_mnt_propagation() clearly assumes only one flag is set
but do_change_type() does not check that this is true. For example,
mount() with flags MS_SHARED | MS_RDONLY does not actually make the
mount shared or read-only but does clear MNT_UNBINDABLE.
Signed-off-by: Valerie Aurora <vaurora@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions