Staging: unisys: fix potential format string leak
authorKees Cook <keescook@chromium.org>
Tue, 8 Dec 2015 21:07:01 +0000 (13:07 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
Since "name" is always used directly, force "%s" for the kthread
format string to avoid any potential format string leaks.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorhba/visorhba_main.c

index d5178b4..202bfab 100644 (file)
@@ -167,7 +167,7 @@ static int visor_thread_start(struct visor_thread_info *thrinfo,
 {
        /* used to stop the thread */
        init_completion(&thrinfo->has_stopped);
-       thrinfo->task = kthread_run(threadfn, thrcontext, name);
+       thrinfo->task = kthread_run(threadfn, thrcontext, "%s", name);
        if (IS_ERR(thrinfo->task)) {
                thrinfo->id = 0;
                return PTR_ERR(thrinfo->task);