From: Ben Hutchings Date: Sat, 1 Apr 2017 03:55:18 +0000 (+0100) Subject: keys: Guard against null match function in keyring_search_aux() X-Git-Tag: v3.2.88~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2b41f761b086da2ec43b1cfea14ca0681cd08b0;p=pandora-kernel.git keys: Guard against null match function in keyring_search_aux() The "dead" key type has no match operation, and a search for keys of this type can cause a null dereference in keyring_search_aux(). keyring_search() has a check for this, but request_keyring_and_link() does not. Move the check into keyring_search_aux(), covering both of them. This was fixed upstream by commit c06cfb08b88d ("KEYS: Remove key_type::match in favour of overriding default by match_preparse"), part of a series of large changes that are not suitable for backporting. CVE-2017-2647 / CVE-2017-6951 Reported-by: Igor Redko Reported-by: Andrey Ryabinin References: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-2647 Reported-by: idl3r References: https://www.spinics.net/lists/keyrings/msg01845.html Signed-off-by: Ben Hutchings Cc: David Howells --- Reading git-diff-tree failed