Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933604AbcKIL2t (ORCPT ); Wed, 9 Nov 2016 06:28:49 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:54476 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933578AbcKILHI (ORCPT ); Wed, 9 Nov 2016 06:07:08 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Artem Savkov , David Howells , Stephan Mueller , Kirill Marinushkin , James Morris Subject: [PATCH 4.8 025/138] security/keys: make BIG_KEYS dependent on stdrng. Date: Wed, 9 Nov 2016 11:45:08 +0100 Message-Id: <20161109102845.887434883@linuxfoundation.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161109102844.808685475@linuxfoundation.org> References: <20161109102844.808685475@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1261 Lines: 37 4.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Artem Savkov commit 31e6ec4519c0fe0ee4a2f6ba3ab278e9506b9500 upstream. Since BIG_KEYS can't be compiled as module it requires one of the "stdrng" providers to be compiled into kernel. Otherwise big_key_crypto_init() fails on crypto_alloc_rng step and next dereference of big_key_skcipher (e.g. in big_key_preparse()) results in a NULL pointer dereference. Fixes: 13100a72f40f5748a04017e0ab3df4cf27c809ef ('Security: Keys: Big keys stored encrypted') Signed-off-by: Artem Savkov Signed-off-by: David Howells cc: Stephan Mueller cc: Kirill Marinushkin Signed-off-by: James Morris Signed-off-by: Greg Kroah-Hartman --- security/keys/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/keys/Kconfig +++ b/security/keys/Kconfig @@ -41,7 +41,7 @@ config BIG_KEYS bool "Large payload keys" depends on KEYS depends on TMPFS - select CRYPTO + depends on (CRYPTO_ANSI_CPRNG = y || CRYPTO_DRBG = y) select CRYPTO_AES select CRYPTO_ECB select CRYPTO_RNG