]> git.baikalelectronics.ru Git - kernel.git/commit
KEYS: Change the name of the dead type to ".dead" to prevent user access
authorDavid Howells <dhowells@redhat.com>
Tue, 18 Apr 2017 14:31:08 +0000 (15:31 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 18 Apr 2017 14:31:39 +0000 (15:31 +0100)
commit10b8fb93f820c1834e26c9755a8f5014f0e2c53c
tree31ff05d7310b95fbf992b0c3cf328a5e6b0eba83
parent19e0987acb5cac367171820e3b9a8da5a35a4a87
KEYS: Change the name of the dead type to ".dead" to prevent user access

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 6816080662bc2ccfca8d3634a2c44ddd3877cd09
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.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: stable@vger.kernel.org
security/keys/gc.c