Skip to content

Commit

Permalink
crypto: jitterentropy - use safe format string parameters
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kees Cook authored and Herbert Xu committed Jul 28, 2015
1 parent ec0d6fa commit 0c5f0aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/jitterentropy-kcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0c5f0aa

Please sign in to comment.