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)
committerWilly Tarreau <w@1wt.eu>
Sat, 27 Aug 2016 09:40:31 +0000 (11:40 +0200)
commite5201134028bd04d5f0fb020a2579605b61a3078
treedf0033aa75a51ccf135dae88027ed1e27af7c210
parent6e47981c293625dae096c6cccbd49e2c4071139d
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/ecryptfs/file.c