Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932215AbbFHWbJ (ORCPT ); Mon, 8 Jun 2015 18:31:09 -0400 Received: from smtp.outflux.net ([198.145.64.163]:38346 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbbFHWbB (ORCPT ); Mon, 8 Jun 2015 18:31:01 -0400 Date: Mon, 8 Jun 2015 15:30:53 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Tomi Valkeinen , Jean-Christophe Plagniol-Villard , Kees Cook , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [PATCH] fbdev: omap2: remove potential format string leak Message-ID: <20150608223053.GA28939@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 Content-Length: 1146 Lines: 33 Since kobject_init_and_add takes a format string, make sure that the passed in name cannot be accidentally parsed. Signed-off-by: Kees Cook --- drivers/video/fbdev/omap2/dss/display-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c index 12186557a9d4..6ad0991f8259 100644 --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c @@ -324,7 +324,7 @@ int display_init_sysfs(struct platform_device *pdev) for_each_dss_dev(dssdev) { r = kobject_init_and_add(&dssdev->kobj, &display_ktype, - &pdev->dev.kobj, dssdev->alias); + &pdev->dev.kobj, "%s", dssdev->alias); if (r) { DSSERR("failed to create sysfs files\n"); omap_dss_put_device(dssdev); -- 1.9.1 -- Kees Cook Chrome OS 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/