Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754435AbbGXXi7 (ORCPT ); Fri, 24 Jul 2015 19:38:59 -0400 Received: from smtp.outflux.net ([198.145.64.163]:52237 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753030AbbGXXi6 (ORCPT ); Fri, 24 Jul 2015 19:38:58 -0400 Date: Fri, 24 Jul 2015 16:38:53 -0700 From: Kees Cook To: Greg Kroah-Hartman Cc: Benjamin Romer , David Kershner , sparmaintainer@unisys.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: unisys: avoid format string parsing Message-ID: <20150724233853.GA16544@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 This makes sure the kthread name can't be parsed as a format string. Signed-off-by: Kees Cook --- drivers/staging/unisys/visornic/visornic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 710074437737..9af4ed8d6f10 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -296,7 +296,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 -EINVAL; -- 1.9.1 -- Kees Cook Chrome OS Security