From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932241AbbFDShM (ORCPT ); Thu, 4 Jun 2015 14:37:12 -0400 Received: from smtp.outflux.net ([198.145.64.163]:48290 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932204AbbFDShI (ORCPT ); Thu, 4 Jun 2015 14:37:08 -0400 Date: Thu, 4 Jun 2015 11:37:01 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Benjamin Romer , David Kershner , Greg Kroah-Hartman , Devendra Naga , Bryan Thompson , Michel von Czettritz , sparmaintainer@unisys.com, devel@driverdev.osuosl.org Subject: [PATCH] staging: unisys: drop format string in kthread_run Message-ID: <20150604183701.GA19803@www.outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-HELO: www.outflux.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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