* [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
* Re: [PATCH] jent: use safe format string parameters
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
1 sibling, 0 replies; 3+ messages in thread
From: Stephan Mueller @ 2015-07-25 10:14 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel, Herbert Xu, David S. Miller, linux-crypto
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] jent: use safe format string parameters
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
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2015-07-28 7:07 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel, David S. Miller, linux-crypto
On Fri, Jul 24, 2015 at 03:41:27PM -0700, Kees Cook wrote:
> 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>
Applied.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ 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®