diff options
author | Kees Cook <keescook@chromium.org> | 2014-11-24 16:32:38 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-02-20 00:49:36 +0000 |
commit | bed7f528031d6c800615380990af22cd8b0e3577 (patch) | |
tree | 252c0e2c8b6c0cadb01932dd88cbd14f2d88ef69 /crypto | |
parent | 9ffea4cb2306945b5df5f28bb8686333fe666bf1 (diff) | |
download | linux-stable-bed7f528031d6c800615380990af22cd8b0e3577.tar.gz linux-stable-bed7f528031d6c800615380990af22cd8b0e3577.tar.bz2 linux-stable-bed7f528031d6c800615380990af22cd8b0e3577.zip |
crypto: include crypto- module prefix in template
commit 4943ba16bbc2db05115707b3ff7b4874e9e3c560 upstream.
This adds the module loading prefix "crypto-" to the template lookup
as well.
For example, attempting to load 'vfat(blowfish)' via AF_ALG now correctly
includes the "crypto-" prefix at every level, correctly rejecting "vfat":
net-pf-38
algif-hash
crypto-vfat(blowfish)
crypto-vfat(blowfish)-all
crypto-vfat
Reported-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[bwh: Backported to 3.2: drop changes to cmac and mcryptd which we don't have]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/algapi.c | 4 | ||||
-rw-r--r-- | crypto/authenc.c | 1 | ||||
-rw-r--r-- | crypto/authencesn.c | 1 | ||||
-rw-r--r-- | crypto/cbc.c | 1 | ||||
-rw-r--r-- | crypto/ccm.c | 1 | ||||
-rw-r--r-- | crypto/chainiv.c | 1 | ||||
-rw-r--r-- | crypto/cryptd.c | 1 | ||||
-rw-r--r-- | crypto/ctr.c | 1 | ||||
-rw-r--r-- | crypto/cts.c | 1 | ||||
-rw-r--r-- | crypto/ecb.c | 1 | ||||
-rw-r--r-- | crypto/eseqiv.c | 1 | ||||
-rw-r--r-- | crypto/gcm.c | 1 | ||||
-rw-r--r-- | crypto/hmac.c | 1 | ||||
-rw-r--r-- | crypto/lrw.c | 1 | ||||
-rw-r--r-- | crypto/pcbc.c | 1 | ||||
-rw-r--r-- | crypto/pcrypt.c | 1 | ||||
-rw-r--r-- | crypto/seqiv.c | 1 | ||||
-rw-r--r-- | crypto/vmac.c | 1 | ||||
-rw-r--r-- | crypto/xcbc.c | 1 | ||||
-rw-r--r-- | crypto/xts.c | 1 |
20 files changed, 21 insertions, 2 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index dc9991f5ab5e..3b9ef92da6fc 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -477,8 +477,8 @@ static struct crypto_template *__crypto_lookup_template(const char *name) struct crypto_template *crypto_lookup_template(const char *name) { - return try_then_request_module(__crypto_lookup_template(name), "%s", - name); + return try_then_request_module(__crypto_lookup_template(name), + "crypto-%s", name); } EXPORT_SYMBOL_GPL(crypto_lookup_template); diff --git a/crypto/authenc.c b/crypto/authenc.c index d21da2f0f508..112b4e3b6cce 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -710,3 +710,4 @@ module_exit(crypto_authenc_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Simple AEAD wrapper for IPsec"); +MODULE_ALIAS_CRYPTO("authenc"); diff --git a/crypto/authencesn.c b/crypto/authencesn.c index 136b68b9d8d4..dd1f303b319d 100644 --- a/crypto/authencesn.c +++ b/crypto/authencesn.c @@ -833,3 +833,4 @@ module_exit(crypto_authenc_esn_module_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Steffen Klassert <steffen.klassert@secunet.com>"); MODULE_DESCRIPTION("AEAD wrapper for IPsec with extended sequence numbers"); +MODULE_ALIAS_CRYPTO("authencesn"); diff --git a/crypto/cbc.c b/crypto/cbc.c index 61ac42e1e32b..780ee27b2d43 100644 --- a/crypto/cbc.c +++ b/crypto/cbc.c @@ -289,3 +289,4 @@ module_exit(crypto_cbc_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("CBC block cipher algorithm"); +MODULE_ALIAS_CRYPTO("cbc"); diff --git a/crypto/ccm.c b/crypto/ccm.c index e9032733d326..aa8d4f5036fb 100644 --- a/crypto/ccm.c +++ b/crypto/ccm.c @@ -890,3 +890,4 @@ MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Counter with CBC MAC"); MODULE_ALIAS_CRYPTO("ccm_base"); MODULE_ALIAS_CRYPTO("rfc4309"); +MODULE_ALIAS_CRYPTO("ccm"); diff --git a/crypto/chainiv.c b/crypto/chainiv.c index ba200b07449d..3bf2eb024f31 100644 --- a/crypto/chainiv.c +++ b/crypto/chainiv.c @@ -360,3 +360,4 @@ module_exit(chainiv_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Chain IV Generator"); +MODULE_ALIAS_CRYPTO("chainiv"); diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 7bdd61b867c8..75c415d37086 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -955,3 +955,4 @@ module_exit(cryptd_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Software async crypto daemon"); +MODULE_ALIAS_CRYPTO("cryptd"); diff --git a/crypto/ctr.c b/crypto/ctr.c index 8f4a5a7224c7..ff7b3a394952 100644 --- a/crypto/ctr.c +++ b/crypto/ctr.c @@ -422,3 +422,4 @@ module_exit(crypto_ctr_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("CTR Counter block mode"); MODULE_ALIAS_CRYPTO("rfc3686"); +MODULE_ALIAS_CRYPTO("ctr"); diff --git a/crypto/cts.c b/crypto/cts.c index ccf9c5de3958..714283db2508 100644 --- a/crypto/cts.c +++ b/crypto/cts.c @@ -351,3 +351,4 @@ module_exit(crypto_cts_module_exit); MODULE_LICENSE("Dual BSD/GPL"); MODULE_DESCRIPTION("CTS-CBC CipherText Stealing for CBC"); +MODULE_ALIAS_CRYPTO("cts"); diff --git a/crypto/ecb.c b/crypto/ecb.c index 935cfef4aa84..12011aff0971 100644 --- a/crypto/ecb.c +++ b/crypto/ecb.c @@ -185,3 +185,4 @@ module_exit(crypto_ecb_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ECB block cipher algorithm"); +MODULE_ALIAS_CRYPTO("ecb"); diff --git a/crypto/eseqiv.c b/crypto/eseqiv.c index 42ce9f570aec..388f582ab0b9 100644 --- a/crypto/eseqiv.c +++ b/crypto/eseqiv.c @@ -267,3 +267,4 @@ module_exit(eseqiv_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Encrypted Sequence Number IV Generator"); +MODULE_ALIAS_CRYPTO("eseqiv"); diff --git a/crypto/gcm.c b/crypto/gcm.c index b6a52ce74336..1e3356107af2 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -1377,3 +1377,4 @@ MODULE_AUTHOR("Mikko Herranen <mh1@iki.fi>"); MODULE_ALIAS_CRYPTO("gcm_base"); MODULE_ALIAS_CRYPTO("rfc4106"); MODULE_ALIAS_CRYPTO("rfc4543"); +MODULE_ALIAS_CRYPTO("gcm"); diff --git a/crypto/hmac.c b/crypto/hmac.c index 8d9544cf8169..ade790b454e9 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c @@ -271,3 +271,4 @@ module_exit(hmac_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("HMAC hash algorithm"); +MODULE_ALIAS_CRYPTO("hmac"); diff --git a/crypto/lrw.c b/crypto/lrw.c index 358f80be2bf9..567c195e6d40 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c @@ -312,3 +312,4 @@ module_exit(crypto_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("LRW block cipher mode"); +MODULE_ALIAS_CRYPTO("lrw"); diff --git a/crypto/pcbc.c b/crypto/pcbc.c index d1b8bdfb5855..f654965f0933 100644 --- a/crypto/pcbc.c +++ b/crypto/pcbc.c @@ -295,3 +295,4 @@ module_exit(crypto_pcbc_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("PCBC block cipher algorithm"); +MODULE_ALIAS_CRYPTO("pcbc"); diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index 29a89dad68b6..ba9204664e14 100644 --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c @@ -565,3 +565,4 @@ module_exit(pcrypt_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Steffen Klassert <steffen.klassert@secunet.com>"); MODULE_DESCRIPTION("Parallel crypto wrapper"); +MODULE_ALIAS_CRYPTO("pcrypt"); diff --git a/crypto/seqiv.c b/crypto/seqiv.c index 4c4491229417..385895f5b8fd 100644 --- a/crypto/seqiv.c +++ b/crypto/seqiv.c @@ -363,3 +363,4 @@ module_exit(seqiv_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Sequence Number IV Generator"); +MODULE_ALIAS_CRYPTO("seqiv"); diff --git a/crypto/vmac.c b/crypto/vmac.c index 4243905ba135..8979bc8fd4a0 100644 --- a/crypto/vmac.c +++ b/crypto/vmac.c @@ -673,4 +673,5 @@ module_exit(vmac_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("VMAC hash algorithm"); +MODULE_ALIAS_CRYPTO("vmac"); diff --git a/crypto/xcbc.c b/crypto/xcbc.c index a5fbdf3738cf..df90b332554c 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c @@ -286,3 +286,4 @@ module_exit(crypto_xcbc_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("XCBC keyed hash algorithm"); +MODULE_ALIAS_CRYPTO("xcbc"); diff --git a/crypto/xts.c b/crypto/xts.c index 851705446c82..6a09b727cb29 100644 --- a/crypto/xts.c +++ b/crypto/xts.c @@ -289,3 +289,4 @@ module_exit(crypto_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("XTS block cipher mode"); +MODULE_ALIAS_CRYPTO("xts"); |