Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1286851 > unrolled thread

[PATCH] Staging: unisys: fix potential format string leak

Started byKees Cook <keescook@chromium.org>
First post2015-12-08 22:10 +0100
Last post2015-12-08 22:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] Staging: unisys: fix potential format string leak Kees Cook <keescook@chromium.org> - 2015-12-08 22:10 +0100

#1286851 — [PATCH] Staging: unisys: fix potential format string leak

FromKees Cook <keescook@chromium.org>
Date2015-12-08 22:10 +0100
Subject[PATCH] Staging: unisys: fix potential format string leak
Message-ID<qDxGi-7up-15@gated-at.bofh.it>
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>
---
 drivers/staging/unisys/visorhba/visorhba_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index c119f20dfd44..89712144f804 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -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);
-- 
1.9.1


-- 
Kees Cook
Chrome OS & Brillo Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web