This is a note to let you know that I've just added the patch titled
Set cred->user_ns in key_replace_session_keyring
to the 2.6.39-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
set-cred-user_ns-in-key_replace_session_keyring.patch
and it can be found in the queue-2.6.39 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From f7285b5d631fd6096b11c6af0058ed3a2b30ef4e Mon Sep 17 00:00:00 2001
From: "Serge E. Hallyn" <[email protected]>
Date: Thu, 26 May 2011 15:25:05 -0500
Subject: Set cred->user_ns in key_replace_session_keyring
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: "Serge E. Hallyn" <[email protected]>
commit f7285b5d631fd6096b11c6af0058ed3a2b30ef4e upstream.
Since this cred was not created with copy_creds(), it needs to get
initialized. Otherwise use of syscall(__NR_keyctl, KEYCTL_SESSION_TO_PARENT);
can lead to a NULL deref. Thanks to Robert for finding this.
But introduced by commit 47a150edc2a ("Cache user_ns in struct cred").
Signed-off-by: Serge E. Hallyn <[email protected]>
Reported-by: Robert ÅwiÄcki <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
security/keys/process_keys.c | 1 +
1 file changed, 1 insertion(+)
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -845,6 +845,7 @@ void key_replace_session_keyring(void)
new-> sgid = old-> sgid;
new->fsgid = old->fsgid;
new->user = get_uid(old->user);
+ new->user_ns = new->user->user_ns;
new->group_info = get_group_info(old->group_info);
new->securebits = old->securebits;
Patches currently in stable-queue which might be from [email protected] are
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable