Oleg Nesterov
b502007fc6
cred: copy_process() should clear child->replacement_session_keyring
...
commit 79549c6dfd upstream.
keyctl_session_to_parent(task) sets ->replacement_session_keyring,
it should be processed and cleared by key_replace_session_keyring().
However, this task can fork before it notices TIF_NOTIFY_RESUME and
the new child gets the bogus ->replacement_session_keyring copied by
dup_task_struct(). This is obviously wrong and, if nothing else, this
leads to put_cred(already_freed_cred).
change copy_creds() to clear this member. If copy_process() fails
before this point the wrong ->replacement_session_keyring doesn't
matter, exit_creds() won't be called.
Signed-off-by: Oleg Nesterov <oleg@redhat.com >
Acked-by: David Howells <dhowells@redhat.com >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-04-13 09:13:57 -07:00
..
2012-04-13 09:13:54 -07:00
2012-02-28 09:52:54 +01:00
2012-04-13 09:13:52 -07:00
2012-04-13 09:13:54 -07:00
2012-03-07 08:21:19 -08:00
2012-04-02 10:31:52 -07:00
2012-04-13 09:13:52 -07:00
2012-01-08 12:19:57 -08:00
2012-01-13 09:32:18 +10:30
2012-01-17 16:41:31 -08:00
2012-01-17 16:16:57 -05:00
2012-01-17 16:17:01 -05:00
2012-01-23 08:44:53 -08:00
2012-01-17 10:19:41 -08:00
2012-01-09 12:59:24 -08:00
2012-01-09 12:59:24 -08:00
2011-10-31 19:30:05 -04:00
2011-09-23 12:05:29 +05:30
2012-01-08 13:10:57 -08:00
2012-01-09 12:59:24 -08:00
2011-11-06 19:44:47 -08:00
2012-04-13 09:13:57 -07:00
2011-10-31 09:20:12 -04:00
2012-01-27 11:55:36 +01:00
2012-03-05 15:49:42 -08:00
2011-11-23 09:28:17 -08:00
2012-04-02 10:31:34 -07:00
2011-10-31 09:20:12 -04:00
2011-11-28 08:43:52 -08:00
2012-03-05 15:49:42 -08:00
2011-10-31 09:20:12 -04:00
2011-12-15 14:56:19 +01:00
2011-12-27 11:22:24 +02:00
2012-01-12 20:13:11 -08:00
2011-10-31 09:20:12 -04:00
2012-04-13 09:13:54 -07:00
2012-03-05 15:49:42 -08:00
2011-10-31 09:20:13 -04:00
2011-11-23 09:28:17 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-01-06 08:02:58 -08:00
2012-01-14 00:33:03 +01:00
2012-04-02 10:32:22 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-01-12 20:13:11 -08:00
2012-02-14 11:02:15 +10:30
2012-01-12 20:13:11 -08:00
2012-02-13 20:45:38 -05:00
2011-12-15 14:56:19 +01:00
2011-10-31 09:20:12 -04:00
2012-03-05 15:49:42 -08:00
2011-10-31 09:20:12 -04:00
2012-01-14 18:36:33 -08:00
2011-10-31 09:20:11 -04:00
2011-12-11 10:31:42 -08:00
2011-12-11 10:31:30 -08:00
2011-12-11 10:33:19 -08:00
2011-12-11 10:32:22 -08:00
2012-01-16 09:44:05 -08:00
2011-12-11 10:33:19 -08:00
2011-12-11 10:31:24 -08:00
2011-12-11 10:32:22 -08:00
2011-12-11 10:32:09 -08:00
2012-02-10 09:04:49 +01:00
2012-01-22 15:08:46 -05:00
2011-10-31 09:20:12 -04:00
2011-12-06 08:16:49 +01:00
2011-12-14 14:54:22 -08:00
2011-12-11 10:33:18 -08:00
2011-10-31 09:20:12 -04:00
2012-01-17 16:16:55 -05:00
2011-10-31 09:20:12 -04:00
2012-01-10 16:30:54 -08:00
2011-10-31 09:20:12 -04:00
2011-12-11 10:31:38 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 17:30:44 -07:00
2012-03-15 17:03:03 -07:00
2011-12-20 10:25:04 -08:00
2012-04-13 09:13:55 -07:00
2011-09-19 17:04:37 -07:00
2011-10-31 09:20:12 -04:00
2012-01-06 07:53:34 -08:00
2012-01-16 11:35:57 -05:00
2011-12-15 14:56:19 +01:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-12-21 10:07:39 +01:00
2012-01-26 21:28:45 +01:00
2012-03-02 10:51:00 +01:00