android_kernel_google_msm/security/keys
David Howells fd3eaa52b0 KEYS: Change the name of the dead type to ".dead" to prevent user access
commit c1644fe041ebaf6519f6809146a77c3ead9193af upstream.

This fixes CVE-2017-6951.

Userspace should not be able to do things with the "dead" key type as it
doesn't have some of the helper functions set upon it that the kernel
needs.  Attempting to use it may cause the kernel to crash.

Fix this by changing the name of the type to ".dead" so that it's rejected
up front on userspace syscalls by key_get_type_from_user().

Though this doesn't seem to affect recent kernels, it does affect older
ones, certainly those prior to:

	commit c06cfb08b8
	Author: David Howells <dhowells@redhat.com>
	Date:   Tue Sep 16 17:36:06 2014 +0100
	KEYS: Remove key_type::match in favour of overriding default by match_preparse

which went in before 3.18-rc1.

Change-Id: Ie5b45fceec53036f21c37ee6e1c151f1b1227584
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-04 01:49:56 +03:00
..
encrypted-keys
compat.c KEYS: Add invalidation support 2016-10-29 23:12:12 +08:00
gc.c KEYS: Change the name of the dead type to ".dead" to prevent user access 2017-07-04 01:49:56 +03:00
internal.h KEYS: Add invalidation support 2016-10-29 23:12:12 +08:00
key.c KEYS: potential uninitialized variable 2016-10-31 22:49:16 +11:00
keyctl.c KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings 2017-06-26 21:32:46 +03:00
keyring.c KEYS: Add invalidation support 2016-10-29 23:12:12 +08:00
Makefile
permission.c KEYS: Add invalidation support 2016-10-29 23:12:12 +08:00
proc.c KEYS: Fix short sprintf buffer in /proc/keys show function 2016-10-31 23:36:27 +11:00
process_keys.c KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings 2017-05-19 18:40:58 -06:00
request_key.c
request_key_auth.c
sysctl.c
trusted.c
trusted.h
user_defined.c