All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: jmorris@namei.org
Cc: Stephan Mueller <smueller@chronox.de>,
	Artem Savkov <asavkov@redhat.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	dhowells@redhat.com, linux-security-module@vger.kernel.org,
	keyrings@vger.kernel.org,
	Kirill Marinushkin <k.marinushkin@gmail.com>
Subject: [PATCH 3/3] security/keys: make BIG_KEYS dependent on stdrng.
Date: Wed, 26 Oct 2016 15:02:09 +0100	[thread overview]
Message-ID: <147749052964.683.8592287354339375075.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <147749050748.683.4024891882293453809.stgit@warthog.procyon.org.uk>

From: Artem Savkov <asavkov@redhat.com>

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 <asavkov@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Stephan Mueller <smueller@chronox.de>
cc: Kirill Marinushkin <k.marinushkin@gmail.com>
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 f826e8739023..d942c7c2bc0a 100644
--- 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

      parent reply	other threads:[~2016-10-26 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 14:01 [PATCH 0/3] KEYS: Fixes David Howells
2016-10-26 14:01 ` [PATCH 1/3] KEYS: Fix short sprintf buffer in /proc/keys show function David Howells
2016-10-26 14:02 ` [PATCH 2/3] KEYS: Sort out big_key initialisation David Howells
2016-10-26 14:02 ` David Howells [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=147749052964.683.8592287354339375075.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=asavkov@redhat.com \
    --cc=jmorris@namei.org \
    --cc=k.marinushkin@gmail.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=smueller@chronox.de \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.