eCryptfs: Clear LOOKUP_OPEN flag when creating lower file
commit9b0d3ea667b7988bc29b4a7af9ba6b05c43bcb2b
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Thu, 23 Sep 2010 07:35:04 +0000 (23 02:35 -0500)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:07 +0000 (14 23:40 +0100)
tree9c848730e728bbfe9c272e285e4e7ff826c7418f
parent65f23ae22dc7bb397c35aa4453f755b6cd270c3e
eCryptfs: Clear LOOKUP_OPEN flag when creating lower file

commit 2e21b3f124eceb6ab5a07c8a061adce14ac94e14 upstream.

eCryptfs was passing the LOOKUP_OPEN flag through to the lower file
system, even though ecryptfs_create() doesn't support the flag. A valid
filp for the lower filesystem could be returned in the nameidata if the
lower file system's create() function supported LOOKUP_OPEN, possibly
resulting in unencrypted writes to the lower file.

However, this is only a potential problem in filesystems (FUSE, NFS,
CIFS, CEPH, 9p) that eCryptfs isn't known to support today.

https://bugs.launchpad.net/ecryptfs/+bug/641703

Reported-by: Kevin Buhr
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
fs/ecryptfs/inode.c