* [PATCH] staging: unisys: drop format string in kthread_run
@ 2015-06-04 18:37 Kees Cook
2015-06-05 6:35 ` Sudip Mukherjee
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2015-06-04 18:37 UTC (permalink / raw)
To: linux-kernel
Cc: Benjamin Romer, David Kershner, Greg Kroah-Hartman, Devendra Naga,
Bryan Thompson, Michel von Czettritz, sparmaintainer, devel
Calling kthread_run with a single name parameter causes it to be handled
as a format string. Since the uisthread interface lacks format parameters,
use "%s" to avoid any potential accidents from callers passing in dynamic
string content.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/staging/unisys/uislib/uisthread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c
index d3c973b617ee..4c53eaff3c37 100644
--- a/drivers/staging/unisys/uislib/uisthread.c
+++ b/drivers/staging/unisys/uislib/uisthread.c
@@ -40,7 +40,7 @@ uisthread_start(struct uisthread_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 0; /* failure */
--
1.9.1
--
Kees Cook
Chrome OS Security
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: unisys: drop format string in kthread_run
2015-06-04 18:37 [PATCH] staging: unisys: drop format string in kthread_run Kees Cook
@ 2015-06-05 6:35 ` Sudip Mukherjee
0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2015-06-05 6:35 UTC (permalink / raw)
To: Kees Cook
Cc: linux-kernel, Benjamin Romer, David Kershner, Greg Kroah-Hartman,
Devendra Naga, Bryan Thompson, Michel von Czettritz,
sparmaintainer, devel
On Thu, Jun 04, 2015 at 11:37:01AM -0700, Kees Cook wrote:
> Calling kthread_run with a single name parameter causes it to be handled
> as a format string. Since the uisthread interface lacks format parameters,
> use "%s" to avoid any potential accidents from callers passing in dynamic
> string content.
uislib folder has already been deleted in staging-testing tree.
regards
sudip
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-05 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04 18:37 [PATCH] staging: unisys: drop format string in kthread_run Kees Cook
2015-06-05 6:35 ` Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox