crypto: jitterentropy - use safe format string parameters
authorKees Cook <keescook@chromium.org>
Fri, 24 Jul 2015 22:41:27 +0000 (15:41 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 28 Jul 2015 07:03:34 +0000 (15:03 +0800)
Since the API for jent_panic() does not include format string parameters,
adjust the call to panic() to use a literal string to avoid any future
callers from leaking format strings into the panic message.

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/jitterentropy-kcapi.c

index b32d834144cdce724613dda889cec09484af7384..ceea83d13168f648e2ca22f635504992c24ba7f2 100644 (file)
@@ -79,7 +79,7 @@ int jent_fips_enabled(void)
 
 void jent_panic(char *s)
 {
-       panic(s);
+       panic("%s", s);
 }
 
 void jent_memcpy(void *dest, const void *src, unsigned int n)