]> Git Repo - linux.git/commitdiff
security/keys: make BIG_KEYS dependent on stdrng.
authorArtem Savkov <[email protected]>
Wed, 26 Oct 2016 14:02:09 +0000 (15:02 +0100)
committerJames Morris <[email protected]>
Thu, 27 Oct 2016 05:03:33 +0000 (16:03 +1100)
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 <[email protected]>
Signed-off-by: David Howells <[email protected]>
cc: Stephan Mueller <[email protected]>
cc: Kirill Marinushkin <[email protected]>
cc: [email protected]
Signed-off-by: James Morris <[email protected]>
security/keys/Kconfig

index f826e87390233c1cfddb87e969642ab44219d84f..d942c7c2bc0aa0ee471de663d3f15587f12a1732 100644 (file)
@@ -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
This page took 0.055333 seconds and 4 git commands to generate.