lkml.org 
[lkml]   [2014]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rcutorture: avoid format string leak to thead name
On Thu, May 22, 2014 at 11:51:04AM -0700, Kees Cook wrote:
> Since the rcutorture thread creation interface does not include format
> string arguments, make sure the name can never be accidentally processed
> as a format string.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

> kernel/torture.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/torture.c b/kernel/torture.c
> index acc9afc2f26e..9dad2ffaf995 100644
> --- a/kernel/torture.c
> +++ b/kernel/torture.c
> @@ -694,7 +694,7 @@ int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
> int ret = 0;
>
> VERBOSE_TOROUT_STRING(m);
> - *tp = kthread_run(fn, arg, s);
> + *tp = kthread_run(fn, arg, "%s", s);
> if (IS_ERR(*tp)) {
> ret = PTR_ERR(*tp);
> VERBOSE_TOROUT_ERRSTRING(f);
> --
> 1.7.9.5
>
>
> --
> Kees Cook
> Chrome OS Security


\
 
 \ /
  Last update: 2014-05-22 23:41    [W:0.041 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site