mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] jent: use safe format string parameters
@ 2015-07-24 22:41 Kees Cook
  2015-07-25 10:14 ` Stephan Mueller
  2015-07-28  7:07 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Kees Cook @ 2015-07-24 22:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Herbert Xu, David S. Miller, linux-crypto

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>
---
 crypto/jitterentropy-kcapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c
index b32d834144cd..ceea83d13168 100644
--- a/crypto/jitterentropy-kcapi.c
+++ b/crypto/jitterentropy-kcapi.c
@@ -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)
-- 
1.9.1


-- 
Kees Cook
Chrome OS Security

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-28  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 22:41 [PATCH] jent: use safe format string parameters Kees Cook
2015-07-25 10:14 ` Stephan Mueller
2015-07-28  7:07 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®