lkml.org 
[lkml]   [2015]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] jent: use safe format string parameters
Date
Am Freitag, 24. Juli 2015, 15:41:27 schrieb Kees Cook:

Hi Kees,

>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>

Thanks.

Acked-by: Stephan Mueller <smueller@chronox.de>
>---
> 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)


Ciao
Stephan


\
 
 \ /
  Last update: 2015-07-25 12:41    [W:0.038 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site