<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/keys/keyctl.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security/keys/keyctl.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/security/keys/keyctl.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-06-29T17:26:20Z</updated>
<entry>
<title>[PATCH] Keys: Allow in-kernel key requestor to pass auxiliary data to upcaller</title>
<updated>2006-06-29T17:26:20Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-06-29T09:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e54f08543d05e519e601368571cc3787fefae96'/>
<id>urn:sha1:4e54f08543d05e519e601368571cc3787fefae96</id>
<content type='text'>
The proposed NFS key type uses its own method of passing key requests to
userspace (upcalling) rather than invoking /sbin/request-key.  This is
because the responsible userspace daemon should already be running and will
be contacted through rpc_pipefs.

This patch permits the NFS filesystem to pass auxiliary data to the upcall
operation (struct key_type::request_key) so that the upcaller can use a
pre-existing communications channel more easily.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-By: Kevin Coffman &lt;kwc@citi.umich.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] keys: let keyctl_chown() change a key's owner</title>
<updated>2006-06-26T16:58:18Z</updated>
<author>
<name>Fredrik Tolf</name>
<email>fredrik@dolda2000.com</email>
</author>
<published>2006-06-26T07:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5801649d8b83e7cb9b15839761bdee594653c294'/>
<id>urn:sha1:5801649d8b83e7cb9b15839761bdee594653c294</id>
<content type='text'>
Let keyctl_chown() change a key's owner, including attempting to transfer the
quota burden to the new user.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] keys: sort out key quota system</title>
<updated>2006-06-26T16:58:18Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-06-26T07:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7e047ef5fe2d52e83020e856b1bf2556a6a2ce98'/>
<id>urn:sha1:7e047ef5fe2d52e83020e856b1bf2556a6a2ce98</id>
<content type='text'>
Add the ability for key creation to overrun the user's quota in some
circumstances - notably when a session keyring is created and assigned to a
process that didn't previously have one.

This means it's still possible to log in, should PAM require the creation of a
new session keyring, and fix an overburdened key quota.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] strndup_user: convert keyctl</title>
<updated>2006-03-24T15:33:31Z</updated>
<author>
<name>Davi Arnaut</name>
<email>davi.arnaut@gmail.com</email>
</author>
<published>2006-03-24T11:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0cb409d98e351e6817e0bc37fe6815fc14b2c036'/>
<id>urn:sha1:0cb409d98e351e6817e0bc37fe6815fc14b2c036</id>
<content type='text'>
Copies user-space string with strndup_user() and moves the type string
duplication code to a function (thus fixing a wrong check on the length of the
type.)

Signed-off-by: Davi Arnaut &lt;davi.arnaut@gmail.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix keyctl usage of strnlen_user()</title>
<updated>2006-02-03T16:32:10Z</updated>
<author>
<name>Davi Arnaut</name>
<email>davi.arnaut@gmail.com</email>
</author>
<published>2006-02-03T11:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d94074f0804143eac6bce72dc04447c0040e7d8'/>
<id>urn:sha1:6d94074f0804143eac6bce72dc04447c0040e7d8</id>
<content type='text'>
In the small window between strnlen_user() and copy_from_user() userspace
could alter the terminating `\0' character.

Signed-off-by: Davi Arnaut &lt;davi.arnaut@gmail.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] move capable() to capability.h</title>
<updated>2006-01-12T02:42:13Z</updated>
<author>
<name>Randy.Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2006-01-11T20:17:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c59ede7b78db329949d9cdcd7064e22d357560ef'/>
<id>urn:sha1:c59ede7b78db329949d9cdcd7064e22d357560ef</id>
<content type='text'>
- Move capable() from sched.h to capability.h;

- Use &lt;linux/capability.h&gt; where capable() is used
	(in include/, block/, ipc/, kernel/, a few drivers/,
	mm/, security/, &amp; sound/;
	many more drivers/ to go)

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] keys: Permit running process to instantiate keys</title>
<updated>2006-01-09T04:13:53Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-01-08T09:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b5f545c880a2a47947ba2118b2509644ab7a2969'/>
<id>urn:sha1:b5f545c880a2a47947ba2118b2509644ab7a2969</id>
<content type='text'>
Make it possible for a running process (such as gssapid) to be able to
instantiate a key, as was requested by Trond Myklebust for NFS4.

The patch makes the following changes:

 (1) A new, optional key type method has been added. This permits a key type
     to intercept requests at the point /sbin/request-key is about to be
     spawned and do something else with them - passing them over the
     rpc_pipefs files or netlink sockets for instance.

     The uninstantiated key, the authorisation key and the intended operation
     name are passed to the method.

 (2) The callout_info is no longer passed as an argument to /sbin/request-key
     to prevent unauthorised viewing of this data using ps or by looking in
     /proc/pid/cmdline.

     This means that the old /sbin/request-key program will not work with the
     patched kernel as it will expect to see an extra argument that is no
     longer there.

     A revised keyutils package will be made available tomorrow.

 (3) The callout_info is now attached to the authorisation key. Reading this
     key will retrieve the information.

 (4) A new field has been added to the task_struct. This holds the
     authorisation key currently active for a thread. Searches now look here
     for the caller's set of keys rather than looking for an auth key in the
     lowest level of the session keyring.

     This permits a thread to be servicing multiple requests at once and to
     switch between them. Note that this is per-thread, not per-process, and
     so is usable in multithreaded programs.

     The setting of this field is inherited across fork and exec.

 (5) A new keyctl function (KEYCTL_ASSUME_AUTHORITY) has been added that
     permits a thread to assume the authority to deal with an uninstantiated
     key. Assumption is only permitted if the authorisation key associated
     with the uninstantiated key is somewhere in the thread's keyrings.

     This function can also clear the assumption.

 (6) A new magic key specifier has been added to refer to the currently
     assumed authorisation key (KEY_SPEC_REQKEY_AUTH_KEY).

 (7) Instantiation will only proceed if the appropriate authorisation key is
     assumed first. The assumed authorisation key is discarded if
     instantiation is successful.

 (8) key_validate() is moved from the file of request_key functions to the
     file of permissions functions.

 (9) The documentation is updated.

From: &lt;Valdis.Kletnieks@vt.edu&gt;

    Build fix.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Cc: Alexander Zangerl &lt;az@bond.edu.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] keys: Permit key expiry time to be set</title>
<updated>2006-01-09T04:13:53Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-01-08T09:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=017679c4d45783158dba1dd6f79e712c22bb3d9a'/>
<id>urn:sha1:017679c4d45783158dba1dd6f79e712c22bb3d9a</id>
<content type='text'>
Add a new keyctl function that allows the expiry time to be set on a key or
removed from a key, provided the caller has attribute modification access.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Cc: Alexander Zangerl &lt;az@bond.edu.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Keys: Add LSM hooks for key management [try #3]</title>
<updated>2005-10-31T01:37:23Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2005-10-30T23:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=29db9190634067c5a328ee5fcc2890251b836b4b'/>
<id>urn:sha1:29db9190634067c5a328ee5fcc2890251b836b4b</id>
<content type='text'>
The attached patch adds LSM hooks for key management facilities. The notable
changes are:

 (1) The key struct now supports a security pointer for the use of security
     modules. This will permit key labelling and restrictions on which
     programs may access a key.

 (2) Security modules get a chance to note (or abort) the allocation of a key.

 (3) The key permission checking can now be enhanced by the security modules;
     the permissions check consults LSM if all other checks bear out.

 (4) The key permissions checking functions now return an error code rather
     than a boolean value.

 (5) An extra permission has been added to govern the modification of
     attributes (UID, GID, permissions).

Note that there isn't an LSM hook specifically for each keyctl() operation,
but rather the permissions hook allows control of individual operations based
on the permission request bits.

Key management access control through LSM is enabled by automatically if both
CONFIG_KEYS and CONFIG_SECURITY are enabled.

This should be applied on top of the patch ensubjected:

	[PATCH] Keys: Possessor permissions should be additive

Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Chris Wright &lt;chrisw@osdl.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Keys: Add possessor permissions to keys [try #3]</title>
<updated>2005-09-28T16:10:47Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2005-09-28T16:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=664cceb0093b755739e56572b836a99104ee8a75'/>
<id>urn:sha1:664cceb0093b755739e56572b836a99104ee8a75</id>
<content type='text'>
The attached patch adds extra permission grants to keys for the possessor of a
key in addition to the owner, group and other permissions bits. This makes
SUID binaries easier to support without going as far as labelling keys and key
targets using the LSM facilities.

This patch adds a second "pointer type" to key structures (struct key_ref *)
that can have the bottom bit of the address set to indicate the possession of
a key. This is propagated through searches from the keyring to the discovered
key. It has been made a separate type so that the compiler can spot attempts
to dereference a potentially incorrect pointer.

The "possession" attribute can't be attached to a key structure directly as
it's not an intrinsic property of a key.

Pointers to keys have been replaced with struct key_ref *'s wherever
possession information needs to be passed through.

This does assume that the bottom bit of the pointer will always be zero on
return from kmem_cache_alloc().

The key reference type has been made into a typedef so that at least it can be
located in the sources, even though it's basically a pointer to an undefined
type. I've also renamed the accessor functions to be more useful, and all
reference variables should now end in "_ref".

Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
