<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs, branch mybooklive</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/ecryptfs?h=mybooklive</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/ecryptfs?h=mybooklive'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-02-23T15:37:58Z</updated>
<entry>
<title>eCryptfs: Add getattr function</title>
<updated>2010-02-23T15:37:58Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-11-04T08:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=081312e8c147a85df0f37dcc45d7e2fbaf79dfb2'/>
<id>urn:sha1:081312e8c147a85df0f37dcc45d7e2fbaf79dfb2</id>
<content type='text'>
commit f8f484d1b6677dd5cd5e7e605db747e8c30bbd47 upstream.

The i_blocks field of an eCryptfs inode cannot be trusted, but
generic_fillattr() uses it to instantiate the blocks field of a stat()
syscall when a filesystem doesn't implement its own getattr().  Users
have noticed that the output of du is incorrect on newly created files.

This patch creates ecryptfs_getattr() which calls into the lower
filesystem's getattr() so that eCryptfs can use its kstat.blocks value
after calling generic_fillattr().  It is important to note that the
block count includes the eCryptfs metadata stored in the beginning of
the lower file plus any padding used to fill an extent before
encryption.

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

Reported-by: Dominic Sacré &lt;dominic.sacre@gmx.de&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Cc: Tim Gardner &lt;timg@tpi.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ecryptfs: initialize private persistent file before dereferencing pointer</title>
<updated>2010-01-25T18:49:18Z</updated>
<author>
<name>Erez Zadok</name>
<email>ezk@cs.sunysb.edu</email>
</author>
<published>2009-12-03T18:35:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c535426188c312914bebec8158324dbdbdca2d3'/>
<id>urn:sha1:8c535426188c312914bebec8158324dbdbdca2d3</id>
<content type='text'>
commit e27759d7a333d1f25d628c4f7caf845c51be51c2 upstream.

Ecryptfs_open dereferences a pointer to the private lower file (the one
stored in the ecryptfs inode), without checking if the pointer is NULL.
Right afterward, it initializes that pointer if it is NULL.  Swap order of
statements to first initialize.  Bug discovered by Duckjin Kang.

Signed-off-by: Duckjin Kang &lt;fromdj2k@gmail.com&gt;
Signed-off-by: Erez Zadok &lt;ezk@cs.sunysb.edu&gt;
Cc: Dustin Kirkland &lt;kirkland@canonical.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ecryptfs: use after free</title>
<updated>2010-01-25T18:49:17Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-01-19T09:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36212162584e722f432f531d7611099e31fe9f3e'/>
<id>urn:sha1:36212162584e722f432f531d7611099e31fe9f3e</id>
<content type='text'>
commit ece550f51ba175c14ec3ec047815927d7386ea1f upstream.

The "full_alg_name" variable is used on a couple error paths, so we
shouldn't free it until the end.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ima: ecryptfs fix imbalance message</title>
<updated>2009-10-08T16:31:38Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-10-05T18:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36520be8e32b49bd85a63b7b8b40cd07c3da59a5'/>
<id>urn:sha1:36520be8e32b49bd85a63b7b8b40cd07c3da59a5</id>
<content type='text'>
The unencrypted files are being measured.  Update the counters to get
rid of the ecryptfs imbalance message. (http://bugzilla.redhat.com/519737)

Reported-by: Sachin Garg
Cc: Eric Paris &lt;eparis@redhat.com&gt;
Cc: Dustin Kirkland &lt;kirkland@canonical.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: David Safford &lt;safford@watson.ibm.com&gt;
Cc: stable@kernel.org
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Remove Kconfig NET dependency and select MD5</title>
<updated>2009-10-08T16:31:36Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-09-29T07:33:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ed1f21857e76a92a006e0f890a3d7f72953b1469'/>
<id>urn:sha1:ed1f21857e76a92a006e0f890a3d7f72953b1469</id>
<content type='text'>
eCryptfs no longer uses a netlink interface to communicate with
ecryptfsd, so NET is not a valid dependency anymore.

MD5 is required and must be built for eCryptfs to be of any use.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: depends on CRYPTO</title>
<updated>2009-10-08T16:21:12Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2009-09-28T20:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=664fc5a4e7d0d7f3487e5c856b79f7dac79567fd'/>
<id>urn:sha1:664fc5a4e7d0d7f3487e5c856b79f7dac79567fd</id>
<content type='text'>
ecryptfs uses crypto APIs so it should depend on CRYPTO.
Otherwise many build errors occur. [63 lines not pasted]

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Prevent lower dentry from going negative during unlink</title>
<updated>2009-09-23T14:10:34Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-09-22T17:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9c2d2056647790c5034d722bd24e9d913ebca73c'/>
<id>urn:sha1:9c2d2056647790c5034d722bd24e9d913ebca73c</id>
<content type='text'>
When calling vfs_unlink() on the lower dentry, d_delete() turns the
dentry into a negative dentry when the d_count is 1.  This eventually
caused a NULL pointer deref when a read() or write() was done and the
negative dentry's d_inode was dereferenced in
ecryptfs_read_update_atime() or ecryptfs_getxattr().

Placing mutt's tmpdir in an eCryptfs mount is what initially triggered
the oops and I was able to reproduce it with the following sequence:

open("/tmp/upper/foo", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 3
link("/tmp/upper/foo", "/tmp/upper/bar") = 0
unlink("/tmp/upper/foo")                = 0
open("/tmp/upper/bar", O_RDWR|O_CREAT|O_NOFOLLOW, 0600) = 4
unlink("/tmp/upper/bar")                = 0
write(4, "eCryptfs test\n"..., 14 &lt;unfinished ...&gt;
+++ killed by SIGKILL +++

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

Reported-by: Loïc Minier &lt;loic.minier@canonical.com&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Dave Kleikamp &lt;shaggy@linux.vnet.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Propagate vfs_read and vfs_write return codes</title>
<updated>2009-09-23T14:10:34Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-09-17T00:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=96a7b9c2f5df899f302ade45cf17ad753fe130fd'/>
<id>urn:sha1:96a7b9c2f5df899f302ade45cf17ad753fe130fd</id>
<content type='text'>
Errors returned from vfs_read() and vfs_write() calls to the lower
filesystem were being masked as -EINVAL.  This caused some confusion to
users who saw EINVAL instead of ENOSPC when the disk was full, for
instance.

Also, the actual bytes read or written were not accessible by callers to
ecryptfs_read_lower() and ecryptfs_write_lower(), which may be useful in
some cases.  This patch updates the error handling logic where those
functions are called in order to accept positive return codes indicating
success.

Cc: Eric Sandeen &lt;esandeen@redhat.com&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Validate global auth tok keys</title>
<updated>2009-09-23T14:10:32Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-08-26T06:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3891959846709a19f76628e33478cd85edb0e79f'/>
<id>urn:sha1:3891959846709a19f76628e33478cd85edb0e79f</id>
<content type='text'>
When searching through the global authentication tokens for a given key
signature, verify that a matching key has not been revoked and has not
expired.  This allows the `keyctl revoke` command to be properly used on
keys in use by eCryptfs.

Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Filename encryption only supports password auth tokens</title>
<updated>2009-09-23T14:10:32Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-08-21T09:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=df6ad33ba1b9846bd5f0e2b9016c30c20bc2d948'/>
<id>urn:sha1:df6ad33ba1b9846bd5f0e2b9016c30c20bc2d948</id>
<content type='text'>
Returns -ENOTSUPP when attempting to use filename encryption with
something other than a password authentication token, such as a private
token from openssl.  Using filename encryption with a userspace eCryptfs
key module is a future goal.  Until then, this patch handles the
situation a little better than simply using a BUG_ON().

Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
</feed>
