From: Kees Cook Date: Thu, 22 May 2014 18:51:04 +0000 (-0700) Subject: torture: Avoid format string leak to thead name X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6945915e7f949e213c525d4eb244be87ec92f3d1;p=linux-beck.git torture: Avoid format string leak to thead name Since the torture-test thread creation interface does not include format string arguments, this commit makes sure the name can never be accidentally processed as a format string. Signed-off-by: Kees Cook Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- diff --git a/kernel/torture.c b/kernel/torture.c index 40bb511cca48..d600af21f022 100644 --- a/kernel/torture.c +++ b/kernel/torture.c @@ -708,7 +708,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);