diff options
author | Kees Cook <keescook@chromium.org> | 2013-07-03 15:01:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 16:07:25 -0700 |
commit | 2ef1a640e97408a0fc30b281a370c48105ace867 (patch) | |
tree | 177650dd6931bc982b2a861a3fa5bd1afeb426d3 | |
parent | 3aaf4582ec6bc940a54bf80e3c753697abc6ef6c (diff) | |
download | linux-crypto-2ef1a640e97408a0fc30b281a370c48105ace867.tar.gz linux-crypto-2ef1a640e97408a0fc30b281a370c48105ace867.zip |
crypto: sanitize argument for format string
The template lookup interface does not provide a way to use format
strings, so make sure that the interface cannot be abused accidentally.
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | crypto/algapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 6149a6e0..7a1ae87f 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -495,7 +495,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), name); + return try_then_request_module(__crypto_lookup_template(name), "%s", + name); } EXPORT_SYMBOL_GPL(crypto_lookup_template); |