mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run the risk of exposing module auto-loading to userspace via a crypto API, as demonstrated by Mathias Krause: https://lkml.org/lkml/2013/3/4/70 Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -216,11 +216,11 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
|
||||
|
||||
alg = crypto_alg_lookup(name, type, mask);
|
||||
if (!alg) {
|
||||
request_module("%s", name);
|
||||
request_module("crypto-%s", name);
|
||||
|
||||
if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask &
|
||||
CRYPTO_ALG_NEED_FALLBACK))
|
||||
request_module("%s-all", name);
|
||||
request_module("crypto-%s-all", name);
|
||||
|
||||
alg = crypto_alg_lookup(name, type, mask);
|
||||
}
|
||||
|
Reference in New Issue
Block a user