<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/keys, branch v2.6.30</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.30</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.30'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-04-09T17:41:19Z</updated>
<entry>
<title>keys: Handle there being no fallback destination keyring for request_key()</title>
<updated>2009-04-09T17:41:19Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-04-09T16:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34574dd10b6d0697b86703388d6d6af9cbf4bb48'/>
<id>urn:sha1:34574dd10b6d0697b86703388d6d6af9cbf4bb48</id>
<content type='text'>
When request_key() is called, without there being any standard process
keyrings on which to fall back if a destination keyring is not specified, an
oops is liable to occur when construct_alloc_key() calls down_write() on
dest_keyring's semaphore.

Due to function inlining this may be seen as an oops in down_write() as called
from request_key_and_link().

This situation crops up during boot, where request_key() is called from within
the kernel (such as in CIFS mounts) where nobody is actually logged in, and so
PAM has not had a chance to create a session keyring and user keyrings to act
as the fallback.

To fix this, make construct_alloc_key() not attempt to cache a key if there is
no fallback key if no destination keyring is given specifically.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>keys: make procfiles per-user-namespace</title>
<updated>2009-02-27T01:35:15Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2009-02-27T00:28:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=454804ab0302b354e35d992d08e53fe03313baaf'/>
<id>urn:sha1:454804ab0302b354e35d992d08e53fe03313baaf</id>
<content type='text'>
Restrict the /proc/keys and /proc/key-users output to keys
belonging to the same user namespace as the reading task.

We may want to make this more complicated - so that any
keys in a user-namespace which is belongs to the reading
task are also shown.  But let's see if anyone wants that
first.

Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>keys: skip keys from another user namespace</title>
<updated>2009-02-27T01:35:12Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2009-02-27T00:27:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ea190d0a006ce5218baa6e798512652446a605a'/>
<id>urn:sha1:2ea190d0a006ce5218baa6e798512652446a605a</id>
<content type='text'>
When listing keys, do not return keys belonging to the
same uid in another user namespace.  Otherwise uid 500
in another user namespace will return keyrings called
uid.500 for another user namespace.

Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>keys: consider user namespace in key_permission</title>
<updated>2009-02-27T01:35:09Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2009-02-27T00:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ff3bc3138a400294ee9e126ac75fc9a9fae4e0b'/>
<id>urn:sha1:8ff3bc3138a400294ee9e126ac75fc9a9fae4e0b</id>
<content type='text'>
If a key is owned by another user namespace, then treat the
key as though it is owned by both another uid and gid.

Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>keys: distinguish per-uid keys in different namespaces</title>
<updated>2009-02-27T01:35:06Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2009-02-27T00:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d1e97562e5e2ac60fb7b25437ba619f95f67fab'/>
<id>urn:sha1:1d1e97562e5e2ac60fb7b25437ba619f95f67fab</id>
<content type='text'>
per-uid keys were looked by uid only.  Use the user namespace
to distinguish the same uid in different namespaces.

This does not address key_permission.  So a task can for instance
try to join a keyring owned by the same uid in another namespace.
That will be handled by a separate patch.

Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>security: introduce missing kfree</title>
<updated>2009-01-17T22:24:46Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@gmail.com</email>
</author>
<published>2009-01-17T16:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d54ee1c7850a954026deec4cd4885f331da35cc'/>
<id>urn:sha1:0d54ee1c7850a954026deec4cd4885f331da35cc</id>
<content type='text'>
Plug this leak.

Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[CVE-2009-0029] System call wrappers part 28</title>
<updated>2009-01-14T13:15:30Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2009-01-14T13:14:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=938bb9f5e840eddbf54e4f62f6c5ba9b3ae12c9d'/>
<id>urn:sha1:938bb9f5e840eddbf54e4f62f6c5ba9b3ae12c9d</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[CVE-2009-0029] System call wrappers part 27</title>
<updated>2009-01-14T13:15:29Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2009-01-14T13:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e7bfb2134dfec37ce04fb3a4ca89299e892d10c'/>
<id>urn:sha1:1e7bfb2134dfec37ce04fb3a4ca89299e892d10c</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>keys: fix sparse warning by adding __user annotation to cast</title>
<updated>2008-12-31T23:32:44Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2008-12-29T03:35:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90bd49ab6649269cd10d0edc86d0e0f62864726a'/>
<id>urn:sha1:90bd49ab6649269cd10d0edc86d0e0f62864726a</id>
<content type='text'>
Fix the following sparse warning:

      CC      security/keys/key.o
    security/keys/keyctl.c:1297:10: warning: incorrect type in argument 2 (different address spaces)
    security/keys/keyctl.c:1297:10:    expected char [noderef] &lt;asn:1&gt;*buffer
    security/keys/keyctl.c:1297:10:    got char *&lt;noident&gt;

which appears to be caused by lack of __user annotation to the cast of
a syscall argument.

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Fix variable uninitialisation warnings</title>
<updated>2008-12-29T03:24:43Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2008-12-29T00:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eca1bf5b4fab56d2feb1572d34d59fcd92ea7df3'/>
<id>urn:sha1:eca1bf5b4fab56d2feb1572d34d59fcd92ea7df3</id>
<content type='text'>
Fix variable uninitialisation warnings introduced in:

	commit 8bbf4976b59fc9fc2861e79cab7beb3f6d647640
	Author: David Howells &lt;dhowells@redhat.com&gt;
	Date:   Fri Nov 14 10:39:14 2008 +1100

	KEYS: Alter use of key instantiation link-to-keyring argument

As:

  security/keys/keyctl.c: In function 'keyctl_negate_key':
  security/keys/keyctl.c:976: warning: 'dest_keyring' may be used uninitialized in this function
  security/keys/keyctl.c: In function 'keyctl_instantiate_key':
  security/keys/keyctl.c:898: warning: 'dest_keyring' may be used uninitialized in this function

Some versions of gcc notice that get_instantiation_key() doesn't always set
*_dest_keyring, but fail to observe that if this happens then *_dest_keyring
will not be read by the caller.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
