<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs/miscdev.c, branch v2.6.32</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.32</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.32'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-04-22T08:54:13Z</updated>
<entry>
<title>eCryptfs: NULL pointer dereference in ecryptfs_send_miscdev()</title>
<updated>2009-04-22T08:54:13Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-03-15T19:17:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57ea34d19963781d05eb12f9b31bd4f70d61ec16'/>
<id>urn:sha1:57ea34d19963781d05eb12f9b31bd4f70d61ec16</id>
<content type='text'>
If data is NULL, msg_ctx-&gt;msg is set to NULL and then dereferenced
afterwards.  ecryptfs_send_raw_message() is the only place that
ecryptfs_send_miscdev() is called with data being NULL, but the only
caller of that function (ecryptfs_process_helo()) is never called.  In
short, there is currently no way to trigger the NULL pointer
dereference.

This patch removes the two unused functions and modifies
ecryptfs_send_miscdev() to remove the NULL dereferences.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: use memdup_user()</title>
<updated>2009-04-21T03:02:51Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-04-08T07:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd56d242b3b80b6f2ca174272b20029aae61df75'/>
<id>urn:sha1:fd56d242b3b80b6f2ca174272b20029aae61df75</id>
<content type='text'>
Remove open-coded memdup_user().

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Replace %Z with %z</title>
<updated>2009-01-06T23:59:22Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2009-01-06T22:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df261c52abdef147084c76ecf14473184e907547'/>
<id>urn:sha1:df261c52abdef147084c76ecf14473184e907547</id>
<content type='text'>
%Z is a gcc-ism. Using %z instead.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: Dustin Kirkland &lt;dustin.kirkland@gmail.com&gt;
Cc: Eric Sandeen &lt;sandeen@redhat.com&gt;
Cc: Tyler Hicks &lt;tchicks@us.ibm.com&gt;
Cc: David Kleikamp &lt;shaggy@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>User namespaces: set of cleanups (v2)</title>
<updated>2008-11-24T23:57:41Z</updated>
<author>
<name>Serge Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2008-10-15T21:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18b6e0414e42d95183f07d8177e3ff0241abd825'/>
<id>urn:sha1:18b6e0414e42d95183f07d8177e3ff0241abd825</id>
<content type='text'>
The user_ns is moved from nsproxy to user_struct, so that a struct
cred by itself is sufficient to determine access (which it otherwise
would not be).  Corresponding ecryptfs fixes (by David Howells) are
here as well.

Fix refcounting.  The following rules now apply:
        1. The task pins the user struct.
        2. The user struct pins its user namespace.
        3. The user namespace pins the struct user which created it.

User namespaces are cloned during copy_creds().  Unsharing a new user_ns
is no longer possible.  (We could re-add that, but it'll cause code
duplication and doesn't seem useful if PAM doesn't need to clone user
namespaces).

When a user namespace is created, its first user (uid 0) gets empty
keyrings and a clean group_info.

This incorporates a previous patch by David Howells.  Here
is his original patch description:

&gt;I suggest adding the attached incremental patch.  It makes the following
&gt;changes:
&gt;
&gt; (1) Provides a current_user_ns() macro to wrap accesses to current's user
&gt;     namespace.
&gt;
&gt; (2) Fixes eCryptFS.
&gt;
&gt; (3) Renames create_new_userns() to create_user_ns() to be more consistent
&gt;     with the other associated functions and because the 'new' in the name is
&gt;     superfluous.
&gt;
&gt; (4) Moves the argument and permission checks made for CLONE_NEWUSER to the
&gt;     beginning of do_fork() so that they're done prior to making any attempts
&gt;     at allocation.
&gt;
&gt; (5) Calls create_user_ns() after prepare_creds(), and gives it the new creds
&gt;     to fill in rather than have it return the new root user.  I don't imagine
&gt;     the new root user being used for anything other than filling in a cred
&gt;     struct.
&gt;
&gt;     This also permits me to get rid of a get_uid() and a free_uid(), as the
&gt;     reference the creds were holding on the old user_struct can just be
&gt;     transferred to the new namespace's creator pointer.
&gt;
&gt; (6) Makes create_user_ns() reset the UIDs and GIDs of the creds under
&gt;     preparation rather than doing it in copy_creds().
&gt;
&gt;David

&gt;Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;

Changelog:
	Oct 20: integrate dhowells comments
		1. leave thread_keyring alone
		2. use current_user_ns() in set_user()

Signed-off-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>CRED: Wrap task credential accesses in the eCryptFS filesystem</title>
<updated>2008-11-13T23:38:49Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2008-11-13T23:38:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4eea03539d9a8e3f5056aed690efde1f75535e7b'/>
<id>urn:sha1:4eea03539d9a8e3f5056aed690efde1f75535e7b</id>
<content type='text'>
Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.

Change most current-&gt;(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

Change some task-&gt;e?[ug]id to task_e?[ug]id().  In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Mike Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: Phillip Hellewell &lt;phillip@hellewell.homeip.net&gt;
Cc: ecryptfs-devel@lists.sourceforge.net
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>ecryptfs: discard ecryptfsd registration messages in miscdev</title>
<updated>2008-07-24T17:47:31Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2008-07-24T04:30:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c4c17b073cd4a5a61bc04329561632870bb21fc'/>
<id>urn:sha1:6c4c17b073cd4a5a61bc04329561632870bb21fc</id>
<content type='text'>
The userspace eCryptfs daemon sends HELO and QUIT messages to the kernel
for per-user daemon (un)registration.  These messages are required when
netlink is used as the transport, but (un)registration is handled by
opening and closing the device file when miscdev is the transport.  These
messages should be discarded in the miscdev transport so that a daemon
isn't registered twice.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Cc: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ecryptfs: remove unnecessary mux from ecryptfs_init_ecryptfs_miscdev()</title>
<updated>2008-07-04T17:40:05Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2008-07-04T16:59:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4a2d7fbec3029c8891a3ad5fceec2992096a3b7'/>
<id>urn:sha1:c4a2d7fbec3029c8891a3ad5fceec2992096a3b7</id>
<content type='text'>
The misc_mtx should provide all the protection required to keep the daemon
hash table sane during miscdev registration.  Since this mutex is causing
gratuitous lockdep warnings, this patch removes it.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Reported-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ecryptfs fixes</title>
<updated>2008-05-21T23:55:59Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2008-05-21T05:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=79bc12a0a09c2eb1ccbb01c192045f994567bda2'/>
<id>urn:sha1:79bc12a0a09c2eb1ccbb01c192045f994567bda2</id>
<content type='text'>
memcpy() from userland pointer is a Bad Thing(tm)

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>eCryptFS: fix imbalanced mutex locking</title>
<updated>2008-05-13T15:02:26Z</updated>
<author>
<name>Cyrill Gorcunov</name>
<email>gorcunov@gmail.com</email>
</author>
<published>2008-05-12T21:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43f14d856f013a4cc63da2c765617c665274338c'/>
<id>urn:sha1:43f14d856f013a4cc63da2c765617c665274338c</id>
<content type='text'>
Fix imbalanced calls for mutex lock/unlock on ecryptfs_daemon_hash_mux
Revealed by Ingo Molnar: http://lkml.org/lkml/2008/5/7/260

Signed-off-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Cc: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: make key module subsystem respect namespaces</title>
<updated>2008-04-29T15:06:07Z</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2008-04-29T07:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a3fd92e73fffd9e583650c56ad9558afe51dc5c'/>
<id>urn:sha1:6a3fd92e73fffd9e583650c56ad9558afe51dc5c</id>
<content type='text'>
Make eCryptfs key module subsystem respect namespaces.

Since I will be removing the netlink interface in a future patch, I just made
changes to the netlink.c code so that it will not break the build.  With my
recent patches, the kernel module currently defaults to the device handle
interface rather than the netlink interface.

[akpm@linux-foundation.org: export free_user_ns()]
Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
