From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932556AbcHKTsT (ORCPT ); Thu, 11 Aug 2016 15:48:19 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33012 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932256AbcHKTsQ (ORCPT ); Thu, 11 Aug 2016 15:48:16 -0400 From: Kirill Marinushkin To: dhowells@redhat.com Cc: k.marinushkin@gmail.com, zer0mem@yahoo.com, gregkh@linuxfoundation.org, serge@hallyn.com, james.l.morris@oracle.com, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: RE: [RFC][PATCH] KEYS: Sort out big_key initialisation Date: Thu, 11 Aug 2016 21:48:07 +0200 Message-Id: <1470944887-8869-1-git-send-email-k.marinushkin@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <10390.1469625815@warthog.procyon.org.uk> References: <10390.1469625815@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > The attached patch *might* fix the problem that's being seen. It certainly > fixes the init problem. I tested that the patch suggested in the original RFC works and really fixes the issue. The issue reproduses always with the reporter's configuration. After applying the patch suggested in the original RFC, big_key returns error code instead of crashing. Tested with: method suggested in the original report; method suggested in the original RFC; some other tests. Additionally below is a fix for dependency. After applying this patch big_key is created and read successfully. --- commit 69ed34b303f87a1a53470dd37149ac1573d79da2 Author: Kirill Marinushkin Date: Mon, 8 Aug 2016 23:19:32 +0200 KEYS: fix big_key dependency Signed-off-by: Kirill Marinushkin cc: David Howells cc: Peter Hlavaty cc: Greg KH cc: stable@vger.kernel.org --- security/keys/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/keys/Kconfig b/security/keys/Kconfig index f826e87..8213221 100644 --- a/security/keys/Kconfig +++ b/security/keys/Kconfig @@ -44,7 +44,7 @@ config BIG_KEYS select CRYPTO select CRYPTO_AES select CRYPTO_ECB - select CRYPTO_RNG + select CRYPTO_ANSI_CPRNG help This option provides support for holding large keys within the kernel (for example Kerberos ticket caches). The data may be stored out to -- 1.9.1