diff options
author | Kees Cook <keescook@chromium.org> | 2014-11-20 20:05:53 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-24 09:43:57 -0500 |
commit | 5d26a105b5a73e5635eae0629b42fa0a90e07b7b (patch) | |
tree | e1be190c7b5dfc70c57b41f8ecb896dfda7d1e16 /crypto/api.c | |
parent | 5d4a5e770d97d87082067886e7097c920b338da5 (diff) |
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>
Diffstat (limited to 'crypto/api.c')
-rw-r--r-- | crypto/api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/api.c b/crypto/api.c index a2b39c5f3649..2a81e98a0021 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -216,11 +216,11 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) | |||
216 | 216 | ||
217 | alg = crypto_alg_lookup(name, type, mask); | 217 | alg = crypto_alg_lookup(name, type, mask); |
218 | if (!alg) { | 218 | if (!alg) { |
219 | request_module("%s", name); | 219 | request_module("crypto-%s", name); |
220 | 220 | ||
221 | if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask & | 221 | if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask & |
222 | CRYPTO_ALG_NEED_FALLBACK)) | 222 | CRYPTO_ALG_NEED_FALLBACK)) |
223 | request_module("%s-all", name); | 223 | request_module("crypto-%s-all", name); |
224 | 224 | ||
225 | alg = crypto_alg_lookup(name, type, mask); | 225 | alg = crypto_alg_lookup(name, type, mask); |
226 | } | 226 | } |