All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] security/keys: make BIG_KEYS dependent on stdrng.
@ 2016-09-05 12:37 Artem Savkov
  2016-09-06 12:58 ` David Howells
  0 siblings, 1 reply; 12+ messages in thread
From: Artem Savkov @ 2016-09-05 12:37 UTC (permalink / raw)
  To: paul.gortmaker
  Cc: dhowells, james.l.morris, keyrings, linux-security-module,
	linux-kernel, Artem Savkov

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.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
---
 security/keys/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/keys/Kconfig b/security/keys/Kconfig
index f826e87..d942c7c 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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-10-25 11:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 12:37 [PATCH] security/keys: make BIG_KEYS dependent on stdrng Artem Savkov
2016-09-06 12:58 ` David Howells
2016-09-06 13:06   ` Artem Savkov
2016-09-06 13:11   ` David Howells
2016-09-06 13:16     ` Stephan Mueller
2016-09-06 13:25     ` Artem Savkov
2016-09-06 16:32     ` Kirill Marinushkin
2016-09-06 18:16     ` David Howells
2016-10-06  8:00       ` Artem Savkov
2016-10-24 14:50       ` David Howells
2016-10-25 10:26         ` Artem Savkov
2016-10-25 11:37         ` David Howells

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.