OSDN Git Service

ecryptfs: don't allow mmap when the lower fs doesn't support it
authorJeff Mahoney <jeffm@suse.com>
Tue, 5 Jul 2016 21:32:30 +0000 (17:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Aug 2016 09:49:27 +0000 (11:49 +0200)
commited5c955e31ff07fa74738b6e0d94c5c17ebbf7c7
treeb2730b32103dd91d1b64905fb6397a5b1828219d
parentae159a027893a8bdeaab0c5f863ca6e57b4468d3
ecryptfs: don't allow mmap when the lower fs doesn't support it

commit f0fe970df3838c202ef6c07a4c2b36838ef0a88b upstream.

There are legitimate reasons to disallow mmap on certain files, notably
in sysfs or procfs.  We shouldn't emulate mmap support on file systems
that don't offer support natively.

CVE-2016-1583

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
[tyhicks: clean up f_op check by using ecryptfs_file_to_lower()]
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ecryptfs/file.c