1 From 1c8fca1d92e14859159a82b8a380d220139b7344 Mon Sep 17 00:00:00 2001
2 From: Kees Cook <keescook@chromium.org>
3 Date: Wed, 3 Jul 2013 15:01:15 -0700
4 Subject: crypto: sanitize argument for format string
6 From: Kees Cook <keescook@chromium.org>
8 commit 1c8fca1d92e14859159a82b8a380d220139b7344 upstream.
10 The template lookup interface does not provide a way to use format
11 strings, so make sure that the interface cannot be abused accidentally.
13 Signed-off-by: Kees Cook <keescook@chromium.org>
14 Cc: Herbert Xu <herbert@gondor.apana.org.au>
15 Cc: "David S. Miller" <davem@davemloft.net>
16 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 crypto/algapi.c | 3 ++-
22 1 file changed, 2 insertions(+), 1 deletion(-)
26 @@ -495,7 +495,8 @@ static struct crypto_template *__crypto_
28 struct crypto_template *crypto_lookup_template(const char *name)
30 - return try_then_request_module(__crypto_lookup_template(name), name);
31 + return try_then_request_module(__crypto_lookup_template(name), "%s",
34 EXPORT_SYMBOL_GPL(crypto_lookup_template);